home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / Dev / Oberon / source / amiga / Intuition.mod < prev    next >
Text File  |  1995-06-29  |  178KB  |  4,669 lines

  1. (**************************************************************************
  2.  
  3.      $RCSfile: Intuition.mod $
  4.   Description: Interface to intuition.library
  5.  
  6.    Created by: fjc (Frank Copeland)
  7.     $Revision: 3.8 $
  8.       $Author: fjc $
  9.         $Date: 1995/06/04 23:13:14 $
  10.  
  11.   Includes Release 40.15
  12.  
  13.   (C) Copyright 1985-1993 Commodore-Amiga, Inc.
  14.       All Rights Reserved
  15.  
  16.   Oberon-A interface Copyright © 1994-1995, Frank Copeland.
  17.   This file is part of the Oberon-A Interface.
  18.   See Oberon-A.doc for conditions of use and distribution.
  19.  
  20. ***************************************************************************)
  21.  
  22. <* STANDARD- *>
  23.  
  24. MODULE [2] Intuition;
  25.  
  26. IMPORT
  27.   SYS := SYSTEM, Kernel, e := Exec, t := Timer, u := Utility,
  28.   gfx := Graphics, ie := InputEvent, km := KeyMap, s := Sets;
  29.  
  30. (*-- Pointer declarations ---------------------------------------------*)
  31.  
  32. TYPE
  33.  
  34.   MenuPtr *          = POINTER TO Menu;
  35.   MenuItemPtr *      = POINTER TO MenuItem;
  36.   RequesterPtr *     = POINTER TO Requester;
  37.   GadgetPtr *        = POINTER TO Gadget;
  38.   BoolInfoPtr *      = POINTER TO BoolInfo;
  39.   PropInfoPtr *      = POINTER TO PropInfo;
  40.   StringInfoPtr *    = POINTER TO StringInfo;
  41.   IntuiTextPtr *     = POINTER TO IntuiText;
  42.   BorderPtr *        = POINTER TO Border;
  43.   ImagePtr *         = POINTER TO Image;
  44.   IntuiMessagePtr *  = POINTER TO IntuiMessage;
  45.   IBoxPtr *          = POINTER TO IBox;
  46.   WindowPtr *        = POINTER TO Window;
  47.   NewWindowPtr *     = POINTER TO NewWindow;
  48.   ExtNewWindowPtr *  = POINTER TO ExtNewWindow;
  49.   DrawInfoPtr *      = POINTER TO DrawInfo;
  50.   ScreenPtr *        = POINTER TO Screen;
  51.   NewScreenPtr *     = POINTER TO NewScreen;
  52.   ExtNewScreenPtr *  = POINTER TO ExtNewScreen;
  53.   PubScreenNodePtr * = POINTER TO PubScreenNode;
  54.   PreferencesPtr *   = POINTER TO Preferences;
  55.   RememberPtr *      = POINTER TO Remember;
  56.   ColorSpecPtr *     = POINTER TO ColorSpec;
  57.   EasyStructPtr *    = POINTER TO EasyStruct;
  58.   StringExtendPtr *  = POINTER TO StringExtend;
  59.   SGWorkPtr *        = POINTER TO SGWork;
  60.   GadgetInfoPtr *    = POINTER TO GadgetInfo;
  61.   PGXPtr *           = POINTER TO PGX;
  62.   MsgPtr *           = POINTER TO Msg;
  63.   OpSetPtr *         = POINTER TO OpSet;
  64.   OpUpdatePtr *      = POINTER TO OpUpdate;
  65.   OpGetPtr *         = POINTER TO OpGet;
  66.   OpAddTailPtr *     = POINTER TO OpAddTail;
  67.   IClassPtr *        = POINTER TO IClass;
  68.   ObjectPtr *        = POINTER TO Object;
  69.   OpMemberPtr *      = POINTER TO OpMember;
  70.   HitTestPtr *       = POINTER TO HitTest;
  71.   RenderPtr *        = POINTER TO Render;
  72.   InputPtr *         = POINTER TO Input;
  73.   GoInactivePtr *    = POINTER TO GoInactive;
  74.   FrameBoxPtr *      = POINTER TO FrameBox;
  75.   DrawPtr *          = POINTER TO Draw;
  76.   ErasePtr *         = POINTER TO Erase;
  77.   IMHitTestPtr *     = POINTER TO IMHitTest;
  78.   DRIPenArrayPtr*    = POINTER TO DRIPenArray;
  79.   GadSpecialInfoPtr* = POINTER TO GadSpecialInfo;
  80.   ExtGadgetPtr *     = POINTER TO ExtGadget;
  81.   ScreenBufferPtr *  = POINTER TO ScreenBuffer;
  82.   TabletDataPtr *    = POINTER TO TabletData;
  83.   TabletHookDataPtr * = POINTER TO TabletHookData;
  84.   LayoutPtr *        = POINTER TO Layout;
  85.  
  86.  
  87. (*
  88. **  $VER: intuition.h 38.26 (15.2.93)
  89. **
  90. **  Interface definitions for Intuition applications.
  91. *)
  92.  
  93. (* ======================================================================== *)
  94. (* === Menu =============================================================== *)
  95. (* ======================================================================== *)
  96.  
  97. TYPE
  98.  
  99.   Menu * = RECORD
  100.     nextMenu *            : MenuPtr;     (* same level *)
  101.     leftEdge *, topEdge * : INTEGER;     (* position of the select box *)
  102.     width *, height *     : INTEGER;     (* dimensions of the select box *)
  103.     flags *               : s.SET16;     (* see flag definitions below *)
  104.     menuName *            : e.LSTRPTR;   (* text for this Menu Header *)
  105.     firstItem *           : MenuItemPtr; (* pointer to first in chain *)
  106.  
  107.     (* these mysteriously-named variables are for internal use only *)
  108.     jazzX *, jazzY *, beatX *, beatY * : INTEGER;
  109.   END; (* Menu *)
  110.  
  111. CONST
  112.  
  113. (* FLAGS SET BY BOTH THE APPLIPROG AND INTUITION *)
  114.   menuEnabled * = 0;      (* whether or not this menu is enabled *)
  115.  
  116. (* FLAGS SET BY INTUITION *)
  117.   miDrawn * = 8;          (* this menu's items are currently drawn *)
  118.  
  119. (* ======================================================================== *)
  120. (* === MenuItem =========================================================== *)
  121. (* ======================================================================== *)
  122.  
  123. TYPE
  124.  
  125.   MenuItem * = RECORD
  126.     nextItem *            : MenuItemPtr; (* pointer to next in chained list *)
  127.     leftEdge *, topEdge * : INTEGER;     (* position of the select box *)
  128.     width *, height *     : INTEGER;     (* dimensions of the select box *)
  129.     flags *               : s.SET16;     (* see the defines below *)
  130.  
  131.     mutualExclude *       : s.SET32;     (* set bits mean this item excludes that *)
  132.  
  133.     itemFill *            : e.APTR;      (* points to Image, IntuiText, or NULL *)
  134.  
  135.     (* when this item is pointed to by the cursor and the items highlight
  136.      * mode HIGHIMAGE is selected, this alternate image will be displayed
  137.      *)
  138.     selectFill *          : e.APTR;      (* points to Image, IntuiText, or NULL *)
  139.  
  140.     command *             : CHAR;        (* only if appliprog sets the COMMSEQ flag *)
  141.  
  142.     subItem *             : MenuItemPtr; (* if non-zero, points to MenuItem for submenu *)
  143.  
  144.     (* The NextSelect field represents the menu number of next selected
  145.      * item (when user has drag-selected several items)
  146.      *)
  147.     nextSelect *          : e.UWORD;
  148.   END; (* MenuItem *)
  149.  
  150.  
  151. CONST
  152.  
  153. (* FLAGS SET BY THE APPLIPROG *)
  154.   checkIt *         = 0;  (* set to indicate checkmarkable item *)
  155.   itemText *        = 1;  (* set if textual, clear if graphical item *)
  156.   commSeq *         = 2;  (* set if there's an command sequence *)
  157.   menuToggle *      = 3;  (* set for toggling checks (else mut. exclude) *)
  158.   itemEnabled *     = 4;  (* set if this item is enabled *)
  159.  
  160. (* these are the SPECIAL HIGHLIGHT FLAG state meanings *)
  161.   highFlags *       = {6,7};  (* see definitions below for these bits *)
  162.   highImage *       = {};     (* use the user's "select image" *)
  163.   highComp *        = {6};    (* highlight by complementing the selectbox *)
  164.   highBox *         = {7};    (* highlight by "boxing" the selectbox *)
  165.   highNone *        = {6,7};  (* don't highlight *)
  166.  
  167. (* FLAGS SET BY BOTH APPLIPROG AND INTUITION *)
  168.   checked * = 8;  (* state of the checkmark *)
  169.  
  170. (* FLAGS SET BY INTUITION *)
  171.   isDrawn *         = 12;  (* this item's subs are currently drawn *)
  172.   highItem *        = 13;  (* this item is currently highlighted *)
  173.   menuToggled *     = 14;  (* this item was already toggled *)
  174.  
  175. (* ======================================================================== *)
  176. (* === Requester ========================================================== *)
  177. (* ======================================================================== *)
  178.  
  179. TYPE
  180.  
  181.   Requester * = RECORD
  182.     olderRequest *        : RequesterPtr;
  183.     leftEdge *, topEdge * : INTEGER;      (* dimensions of the entire box *)
  184.     width *, height *     : INTEGER;      (* dimensions of the entire box *)
  185.     relLeft *, relTop *   : INTEGER;      (* for Pointer relativity offsets *)
  186.  
  187.     reqGadget *           : GadgetPtr;    (* pointer to a list of Gadgets *)
  188.     reqBorder *           : BorderPtr;    (* the box's border *)
  189.     reqText *             : IntuiTextPtr; (* the box's text *)
  190.     flags *               : s.SET16;      (* see definitions below *)
  191.  
  192.     (* pen number for back-plane fill before draws *)
  193.     backFill *            : SHORTINT;
  194.     (* Layer in place of clip rect      *)
  195.     reqLayer *            : gfx.LayerPtr;
  196.  
  197.     reqPad1 *             : ARRAY 32 OF e.UBYTE;
  198.  
  199.     (* If the BitMap plane pointers are non-zero, this tells the system
  200.      * that the image comes pre-drawn (if the appliprog wants to define
  201.      * its own box, in any shape or size it wants!);  this is OK by
  202.      * Intuition as long as there's a good correspondence between
  203.      * the image and the specified Gadgets
  204.      *)
  205.     imageBMap *           : gfx.BitMapPtr;  (* points to the gfx.BitMap of PREDRAWN imagery *)
  206.     rWindow *             : WindowPtr;    (* added.  points back to Window *)
  207.  
  208.     reqImage *            : ImagePtr;     (* new for V36: drawn if USEREQIMAGE set *)
  209.  
  210.     reqPad2 *             : ARRAY 32 OF e.UBYTE;
  211.   END; (* Requester *)
  212.  
  213. CONST
  214.  
  215. (* FLAGS SET BY THE APPLIPROG *)
  216.   pointRel *        = 0;
  217.                           (* if POINTREL set, TopLeft is relative to pointer
  218.                            * for DMRequester, relative to window center
  219.                            * for Request().
  220.                            *)
  221.   preDrawn *        = 1;
  222.         (* set if Requester.ImageBMap points to predrawn Requester imagery *)
  223.   noisyReq *        = 2;
  224.         (* if you don't want requester to filter input     *)
  225.   simpleReq *       = 4;
  226.         (* to use SIMPLEREFRESH layer (recommended)     *)
  227.  
  228. (* New for V36          *)
  229.   useReqImage *     = 5;
  230.         (*  render linked list ReqImage after BackFill
  231.          * but before gadgets and text
  232.          *)
  233.   noReqBackFill *   = 6;
  234.         (* don't bother filling requester with Requester.BackFill pen   *)
  235.  
  236.  
  237. (* FLAGS SET BY INTUITION *)
  238.   reqOffWindow *    = 12;  (* part of one of the Gadgets was offwindow *)
  239.   reqActive *       = 13;  (* this requester is active *)
  240.   sysRequest *      = 14;  (* (unused) this requester caused by system *)
  241.   deferRefresh *    = 15;  (* this Requester stops a Refresh broadcast *)
  242.  
  243. (* ======================================================================== *)
  244. (* === Gadget ============================================================= *)
  245. (* ======================================================================== *)
  246.  
  247. TYPE
  248.   GadSpecialInfo * = RECORD END;
  249.  
  250.   Gadget * = RECORD
  251.     nextGadget *          : GadgetPtr;    (* next gadget in the list *)
  252.  
  253.     leftEdge* , topEdge * : INTEGER;      (* "hit box" of gadget *)
  254.     width* , height *     : INTEGER;      (* "hit box" of gadget *)
  255.  
  256.     flags *               : s.SET16;      (* see below for list of defines *)
  257.  
  258.     activation *          : s.SET16;      (* see below for list of defines *)
  259.  
  260.     gadgetType *          : INTEGER;      (* see below for defines *)
  261.  
  262.     (* appliprog can specify that the Gadget be rendered as either as Border
  263.      * or an Image.  This variable points to which (or equals NULL if there's
  264.      * nothing to be rendered about this Gadget)
  265.      *)
  266.     gadgetRender *        : e.APTR;
  267.  
  268.     (* appliprog can specify "highlighted" imagery rather than algorithmic
  269.      * this can point to either Border or Image data
  270.      *)
  271.     selectRender *        : e.APTR;
  272.  
  273.     gadgetText *          : IntuiTextPtr; (* text for this gadget *)
  274.  
  275.     (* MutualExclude, never implemented, is now declared obsolete.
  276.      * There are published examples of implementing a more general
  277.      * and practical exclusion in your applications.
  278.      *
  279.      * Starting with V36, this field is used to point to a hook
  280.      * for a custom gadget.
  281.      *
  282.      * Programs using this field for their own processing will
  283.      * continue to work, as long as they don't try the
  284.      * trick with custom gadgets.
  285.      *)
  286.     mutualExclude *       : s.SET32;      (* obsolete *)
  287.  
  288.     (* pointer to a structure of special data required by Proportional,
  289.      * String and Integer Gadgets
  290.      *)
  291.     specialInfo *         : GadSpecialInfoPtr;
  292.  
  293.     gadgetID *            : e.UWORD;      (* user-definable ID field *)
  294.     userData *            : e.APTR;       (* ptr to general purpose User data (ignored by In) *)
  295.   END; (* Gadget *)
  296.  
  297.   GadgetDummy * = Gadget;
  298.   GadgetDummyPtr * = GadgetPtr;
  299.  
  300.   ExtGadget * = RECORD (Gadget)  (* The first fields match struct Gadget exactly *)
  301.     (* These fields only exist under V39 and only if gflgExtended is set *)
  302.     moreFlags *      : s.SET32;  (* see gmore* flags below *)
  303.     boundsLeftEdge * : INTEGER;  (* Bounding extent for gadget, valid   *)
  304.     boundsTopEdge *  : INTEGER;  (* only if gmoreBounds is set.  The   *)
  305.     boundsWidth *    : INTEGER;  (* gflgRelxxx flags affect these      *)
  306.     boundsHeight *   : INTEGER;  (* coordinates as well.        *)
  307.   END;
  308.  
  309. CONST
  310.  
  311. (* --- Gadget.Flags values      --- *)
  312. (* combinations in these bits describe the highlight technique to be used *)
  313.   gadgHighBits * = {0,1};
  314.   gadgHComp *    = {};     (* Complement the select box *)
  315.   gadgHBox *     = {0};    (* Draw a box around the image *)
  316.   gadgHImage *   = {1};    (* Blast in this alternate image *)
  317.   gadgHNone *    = {0,1};  (* don't highlight *)
  318.  
  319.   gadgImage *    = 2;      (* set if GadgetRender and SelectRender
  320.                             * point to an Image structure, clear
  321.                             * if they point to Border structures
  322.                             *)
  323.  
  324. (* combinations in these next two bits specify to which corner the gadget's
  325.  * Left & Top coordinates are relative.  If relative to Top/Left,
  326.  * these are "normal" coordinates (everything is relative to something in
  327.  * this universe).
  328.  *
  329.  * Gadget positions and dimensions are relative to the window or
  330.  * requester which contains the gadget
  331.  *)
  332.   gRelBottom *  = 3;  (* vert. pos. is relative to bottom edge *)
  333.   gRelRight *   = 4;  (* horiz. pos. is relative to right edge *)
  334.   gRelWidth *   = 5;  (* width is relative to req/window    *)
  335.   gRelHeight *  = 6;  (* height is relative to req/window   *)
  336.  
  337. (* New for V39: gflgRelSpecial allows custom gadget implementors to
  338.  * make gadgets whose position and size depend in an arbitrary way
  339.  * on their window's dimensions.  The gmLayout method will be invoked
  340.  * for such a gadget (or any other grelXxx gadget) at suitable times,
  341.  * such as when the window opens or the window's size changes.
  342.  *)
  343.   gRelSpecial * = 14;  (* custom gadget has special relativity.
  344.                         * Gadget box values are absolutes, but
  345.                         * can be changed via the GM_LAYOUT method.
  346.                         *)
  347.   selected *    = 7;   (* you may initialize and look at this        *)
  348.  
  349. (* the gflgDISABLED flag is initialized by you and later set by Intuition
  350.  * according to your calls to On/OffGadget().  It specifies whether or not
  351.  * this Gadget is currently disabled from being selected
  352.  *)
  353.   gadgDisabled *     = 8;
  354.  
  355. (* These flags specify the type of text field that Gadget.GadgetText
  356.  * points to.  In all normal (pre-V36) gadgets which you initialize
  357.  * this field should always be zero.  Some types of gadget objects
  358.  * created from classes will use these fields to keep track of
  359.  * types of labels/contents that different from IntuiText, but are
  360.  * stashed in GadgetText.
  361.  *)
  362.  
  363.   labelMask *    = {12,13};
  364.   labelIText *   = {};    (* GadgetText points to IntuiText     *)
  365.   labelString *  = 12;    (* GadgetText points to string *)
  366.   labelImage *   = 13;    (* GadgetText points to Image (object)        *)
  367.  
  368. (* New for V37: gflgTabCycle *)
  369.   tabCycle     * = 9;   (* (string or custom) gadget participates in
  370.                          * cycling activation with Tab or Shift-Tab
  371.                          *)
  372. (* New for V37: gflgStringExtend.  We discovered that V34 doesn't properly
  373.  * ignore the value we had chosen for the Gadget->Activation flag
  374.  * gactStringExtend.  NEVER SET THAT FLAG WHEN RUNNING UNDER V34.
  375.  * The Gadget->Flags bit gflgStringExtend is provided as a synonym which is
  376.  * safe under V34, and equivalent to gactStringExtend under V37.
  377.  * (Note that the two flags are not numerically equal)
  378.  *)
  379.   stringExtend * = 10;  (* this String Gadget has StringExtend        *)
  380.  
  381. (* New for V39: gflgImageDisable.  This flag is automatically set if
  382.  * the custom image of this gadget knows how to do disabled rendering
  383.  * (more specifically, if its IA_SupportsDisable attribute is TRUE).
  384.  * Intuition uses this to defer the ghosting to the image-class,
  385.  * instead of doing it itself (the old compatible way).
  386.  * Do not set this flag yourself - Intuition will do it for you.
  387.  *)
  388.  
  389.   gImagedisable * = 11;     (* Gadget's image knows how to do disabled
  390.                                 * rendering
  391.                                 *)
  392.  
  393. (* New for V39:  If set, this bit means that the Gadget is actually
  394.  * a struct ExtGadget, with new fields and flags.  All V39 boopsi
  395.  * gadgets are ExtGadgets.  Never ever attempt to read the extended
  396.  * fields of a gadget if this flag is not set.
  397.  *)
  398.   gExtended * = 15;        (* Gadget is extended *)
  399.  
  400. (* ---  Gadget.Activation flag values   --- *)
  401. (* Set gactRelVerify if you want to verify that the pointer was still over
  402.  * the gadget when the select button was released.  Will cause
  403.  * an idcmpGadgetUp message to be sent if so.
  404.  *)
  405.   relVerify *    = 0;
  406.  
  407. (* the flag gactImmediate, when set, informs the caller that the gadget
  408.  * was activated when it was activated.  This flag works in conjunction with
  409.  * the gactRelVerify flag
  410.  *)
  411.   gadgImmediate *    = 1;
  412.  
  413. (* the flag gactEndGadget, when set, tells the system that this gadget,
  414.  * when selected, causes the Requester to be ended.  Requesters
  415.  * that are ended are erased and unlinked from the system.
  416.  *)
  417.   endGadget *    = 2;
  418.  
  419. (* the gactFollowMouse flag, when set, specifies that you want to receive
  420.  * reports on mouse movements while this gadget is active.
  421.  * You probably want to set the gactImmediate flag when using
  422.  * gactFollowMouse, since that's the only reasonable way you have of
  423.  * learning why Intuition is suddenly sending you a stream of mouse
  424.  * movement events.  If you don't set gactRelVerify, you'll get at
  425.  * least one Mouse Position event.
  426.  * Note: boolean FollowMouse gadgets require gactRelVerify to get
  427.  * any mouse movement events (this unusual behavior is a compatibility
  428.  * hold-over from the old days).
  429.  *)
  430.   followMouse *  = 3;
  431.  
  432. (* if any of the Border flags are set in a Gadget that's included in the
  433.  * Gadget list when a Window is opened, the corresponding Border will
  434.  * be adjusted to make room for the Gadget
  435.  *)
  436.   rightBorder *  = 4;
  437.   leftBorder *   = 5;
  438.   topBorder *    = 6;
  439.   bottomBorder * = 7;
  440.   borderSniff *  = 15;  (* neither set nor rely on this bit   *)
  441.  
  442.   toggleSelect * = 8;   (* this bit for toggle-select mode *)
  443.   boolExtend *   = 13;  (* this Boolean Gadget has a BoolInfo *)
  444.  
  445. (* should properly be in StringInfo, but aren't *)
  446.   stringLeft *   = {};  (* NOTE WELL: that this has value zero        *)
  447.   stringCenter * = 9;
  448.   stringRight *  = 10;
  449.   longint *      = 11;  (* this String Gadget is for Long Ints        *)
  450.   altKeymap *    = 12;  (* this String has an alternate keymap        *)
  451.   actStringExtend * = 13;  (* this String Gadget has StringExtend        *)
  452.                            (* NOTE: NEVER SET gactStringExtend IF YOU
  453.                             * ARE RUNNING ON LESS THAN V36!  SEE
  454.                             * gflgStringExtend (ABOVE) INSTEAD
  455.                             *)
  456.  
  457.   activeGadget * = 14;      (* this gadget is "active".  This flag
  458.                              * is maintained by Intuition, and you
  459.                              * cannot count on its value persisting
  460.                              * while you do something on your program's
  461.                              * task.  It can only be trusted by
  462.                              * people implementing custom gadgets
  463.                              *)
  464.  
  465. (* note 15 is used above (gactBorderSniff)
  466.  * all Activation flags defined *)
  467.  
  468. (* --- GADGET TYPES ------------------------------------------------------- *)
  469. (* These are the Gadget Type definitions for the variable GadgetType
  470.  * gadget number type MUST start from one.  NO TYPES OF ZERO ALLOWED.
  471.  * first comes the mask for Gadget flags reserved for Gadget typing
  472.  *)
  473.   gadgetType * = -0400H;  (* all Gadget Global Type flags (padded) *)
  474.   scrGadget  * = 04000H;  (* 1 = ScreenGadget, 0 = WindowGadget *)
  475.   gzzGadget  * = 02000H;  (* 1 = for WFLG_GIMMEZEROZERO borders *)
  476.   reqGadget  * = 01000H;  (* 1 = this is a Requester Gadget *)
  477.  
  478. (* gtypSysGadget means that Intuition ALLOCATED the gadget.
  479.  * gtypSysTypeMask is the mask you can apply to tell what type of
  480.  * system-gadget it is.  The possible types follow.
  481.  *)
  482.   sysGadget   * = -8000H;
  483.   sysTypeMask * =  000F0H;
  484.  
  485. (* These definitions describe system gadgets in V36 and higher: *)
  486.   sizing     * = 00010H;   (* Window sizing gadget *)
  487.   wDragging  * = 00020H;   (* Window drag bar      *)
  488.   sDragging  * = 00030H;   (* Screen drag bar      *)
  489.   wDepth     * = 00040H;   (* Window depth gadget  *)
  490.   sDepth     * = 00050H;   (* Screen depth gadget  *)
  491.   wZoom      * = 00060H;   (* Window zoom gadget   *)
  492.   sUnused    * = 00070H;   (* Unused screen gadget *)
  493.   close      * = 00080H;   (* Window close gadget  *)
  494.  
  495. (* These definitions describe system gadgets prior to V36: *)
  496.   wUpFront   * = wDepth;   (* Window to-front gadget *)
  497.   sUpFront   * = sDepth;   (* Screen to-front gadget *)
  498.   wDownBack  * = wZoom;    (* Window to-back gadget  *)
  499.   sDownBack  * = sUnused;  (* Screen to-back gadget  *)
  500.  
  501. (* gtypGTypeMask is a mask you can apply to tell what class
  502.  * of gadget this is.  The possible classes follow.
  503.  *)
  504.   gTypeMask    * = 00007H;
  505.  
  506.   boolGadget   * = 00001H;
  507.   gadget0002   * = 00002H;
  508.   propGadget   * = 00003H;
  509.   strGadget    * = 00004H;
  510.   customGadget * = 00005H;
  511.  
  512. (* This bit in GadgetType is reserved for undocumented internal use
  513.  * by the Gadget Toolkit, and cannot be used nor relied on by
  514.  * applications:        0x0100
  515.  *)
  516.  
  517. (* New for V39.  Gadgets which have the gflgExtended flag set are
  518.  * actually ExtGadgets, which have more flags.  The gmoreXxx
  519.  * identifiers describe those flags.  For gmoreScrollRaster, see
  520.  * important information in the ScrollWindowRaster() autodoc.
  521.  * NB: gmoreScrollRaster must be set before the gadget is
  522.  * added to a window.
  523.  *)
  524.   gmoreBounds *       = 0;  (* ExtGadget has valid Bounds *)
  525.   gmoreGadgetHelp *   = 1;  (* This gadget responds to gadget help *)
  526.   gmoreScrollRaster * = 2;  (* This (custom) gadget uses ScrollRaster *)
  527.  
  528. (* ======================================================================== *)
  529. (* === BoolInfo======================================================= *)
  530. (* ======================================================================== *)
  531. (* This is the special data needed by an Extended Boolean Gadget
  532.  * Typically this structure will be pointed to by the Gadget field SpecialInfo
  533.  *)
  534.  
  535. TYPE
  536.  
  537.   BoolInfo * = RECORD (GadSpecialInfo)
  538.     flags *    : s.SET16; (* defined below *)
  539.     mask *     : e.APTR;  (* bit mask for highlighting and selecting
  540.                            * mask must follow the same rules as an Image
  541.                            * plane.  Its width and height are determined
  542.                            * by the width and height of the gadget's
  543.                            * select box. (i.e. Gadget.Width and .Height).
  544.                            *)
  545.     reserved * : e.ULONG; (* set to 0     *)
  546.   END; (* BoolInfo *)
  547.  
  548. CONST
  549.  
  550. (* set BoolInfo.Flags to this flag bit.
  551.  * in the future, additional bits might mean more stuff hanging
  552.  * off of BoolInfo.Reserved.
  553.  *)
  554.   boolMask *        = 0;  (* extension is for masked gadget *)
  555.  
  556. (* ======================================================================== *)
  557. (* === PropInfo =========================================================== *)
  558. (* ======================================================================== *)
  559. (* this is the special data required by the proportional Gadget
  560.  * typically, this data will be pointed to by the Gadget variable SpecialInfo
  561.  *)
  562.  
  563. TYPE
  564.  
  565.   PropInfo * = RECORD (GadSpecialInfo)
  566.     flags *               : s.SET16; (* general purpose flag bits (see defines below) *)
  567.  
  568.     (* You initialize the Pot variables before the Gadget is added to
  569.      * the system.  Then you can look here for the current settings
  570.      * any time, even while User is playing with this Gadget.  To
  571.      * adjust these after the Gadget is added to the System, use
  572.      * ModifyProp();  The Pots are the actual proportional settings,
  573.      * where a value of zero means zero and a value of MAXPOT means
  574.      * that the Gadget is set to its maximum setting.
  575.      *)
  576.     horizPot *            : e.UWORD; (* 16-bit FixedPoint horizontal quantity percentage *)
  577.     vertPot *             : e.UWORD; (* 16-bit FixedPoint vertical quantity percentage *)
  578.  
  579.     (* the 16-bit FixedPoint Body variables describe what percentage of
  580.      * the entire body of stuff referred to by this Gadget is actually
  581.      * shown at one time.  This is used with the AUTOKNOB routines,
  582.      * to adjust the size of the AUTOKNOB according to how much of
  583.      * the data can be seen.  This is also used to decide how far
  584.      * to advance the Pots when User hits the Container of the Gadget.
  585.      * For instance, if you were controlling the display of a 5-line
  586.      * Window of text with this Gadget, and there was a total of 15
  587.      * lines that could be displayed, you would set the VertBody value to
  588.      * (MAXBODY / (TotalLines / DisplayLines)) * = MAXBODY / 3.
  589.      * Therefore, the AUTOKNOB would fill 1/3 of the container, and
  590.      * if User hits the Cotainer outside of the knob, the pot would
  591.      * advance 1/3 (plus or minus) If there's no body to show, or
  592.      * the total amount of displayable info is less than the display area,
  593.      * set the Body variables to the MAX.  To adjust these after the
  594.      * Gadget is added to the System, use ModifyProp();
  595.      *)
  596.     horizBody *           : e.UWORD; (* horizontal Body *)
  597.     vertBody *            : e.UWORD; (* vertical Body *)
  598.  
  599.     (* these are the variables that Intuition sets and maintains *)
  600.     cWidth *              : e.UWORD; (* Container width (with any relativity absoluted) *)
  601.     cHeight *             : e.UWORD; (* Container height (with any relativity absoluted) *)
  602.     hPotRes *, vPotRes *  : e.UWORD; (* pot increments *)
  603.     leftBorder *          : e.UWORD; (* Container borders *)
  604.     topBorder *           : e.UWORD; (* Container borders *)
  605.   END; (* PropInfo *)
  606.  
  607.  
  608. CONST
  609.  
  610. (* --- FLAG BITS ---------------------------------------------------------- *)
  611.   autoKnob *        = 0;  (* this flag sez:  gimme that old auto-knob *)
  612. (* NOTE: if you do not use an AUTOKNOB for a proportional gadget,
  613.  * you are currently limited to using a single Image of your own
  614.  * design: Intuition won't handle a linked list of images as
  615.  * a proportional gadget knob.
  616.  *)
  617.  
  618.   freeHoriz *       = 1;  (* if set, the knob can move horizontally *)
  619.   freeVert *        = 2;  (* if set, the knob can move vertically *)
  620.   propBorderless *  = 3;  (* if set, no border will be rendered *)
  621.   knobHit *         = 8;  (* set when this Knob is hit *)
  622.   propNewlook *     = 4;  (* set this if you want to get the new
  623.                            * V36 look
  624.                            *)
  625.  
  626.   knobHmin *        = 6;       (* minimum horizontal size of the Knob *)
  627.   knobVmin *        = 4;       (* minimum vertical size of the Knob *)
  628.   maxBody *         = 0FFFFH;  (* maximum body value *)
  629.   maxPot *          = 0FFFFH;  (* maximum pot value *)
  630.  
  631. (* ======================================================================== *)
  632. (* === StringInfo ========================================================= *)
  633. (* ======================================================================== *)
  634. (* this is the special data required by the string Gadget
  635.  * typically, this data will be pointed to by the Gadget variable SpecialInfo
  636.  *)
  637.  
  638. TYPE
  639.  
  640.   StringInfo * = RECORD (GadSpecialInfo)
  641.     (* you initialize these variables, and then Intuition maintains them *)
  642.     buffer *        : e.LSTRPTR; (* the buffer containing the start and final string *)
  643.     undoBuffer *    : e.LSTRPTR; (* optional buffer for undoing current entry *)
  644.     bufferPos *     : INTEGER;   (* character position in Buffer *)
  645.     maxChars *      : INTEGER;   (* max number of chars in Buffer (including NULL) *)
  646.     dispPos *       : INTEGER;   (* Buffer position of first displayed character *)
  647.  
  648.     (* Intuition initializes and maintains these variables for you *)
  649.     undoPos *       : INTEGER;   (* character position in the undo buffer *)
  650.     numChars *      : INTEGER;   (* number of characters currently in Buffer *)
  651.     dispCount *     : INTEGER;   (* number of whole characters visible in Container *)
  652.     cLeft *, cTop * : INTEGER;   (* topleft offset of the container *)
  653.  
  654.     (* This unused field is changed to allow extended specification
  655.      * of string gadget parameters.  It is ignored unless the flag
  656.      * gactSTRINGEXTEND is set in the Gadget's Activation field
  657.      * or the gflgSTRINGEXTEND flag is set in the Gadget Flags field.
  658.      * (See gflgSTRINGEXTEND for an important note)
  659.      *)
  660.     (* struct Layer *LayerPtr;  --- obsolete --- *)
  661.     extension *    : StringExtendPtr;
  662.  
  663.     (* you can initialize this variable before the gadget is submitted to
  664.      * Intuition, and then examine it later to discover what integer
  665.      * the user has entered (if the user never plays with the gadget,
  666.      * the value will be unchanged from your initial setting)
  667.      *)
  668.     longInt *      : LONGINT;
  669.  
  670.     (* If you want this Gadget to use your own Console keymapping, you
  671.      * set the gactALTKEYMAP bit in the Activation flags of the Gadget,
  672.      * and then set this variable to point to your keymap.  If you don't
  673.      * set the gactALTKEYMAP, you'll get the standard ASCII keymapping.
  674.      *)
  675.     altKeyMap *    : km.KeyMapPtr;
  676.   END; (* StringInfo *)
  677.  
  678. (* ======================================================================== *)
  679. (* === IntuiText ========================================================== *)
  680. (* ======================================================================== *)
  681. (* IntuiText is a series of strings that start with a location
  682.  * (always relative to the upper-left corner of something) and then the
  683.  * text of the string.  The text is null-terminated.
  684.  *)
  685.  
  686. TYPE
  687.  
  688.   IntuiText * = RECORD
  689.     frontPen *, backPen * : SHORTINT; (* the pen numbers for the rendering *)
  690.     drawMode *     : s.SET8;          (* the mode for rendering the text *)
  691.     leftEdge *     : INTEGER;         (* relative start location for the text *)
  692.     topEdge *      : INTEGER;         (* relative start location for the text *)
  693.     iTextFont *    : gfx.TextAttrPtr; (* if NULL, you accept the default *)
  694.     iText *        : e.LSTRPTR;       (* pointer to null-terminated text *)
  695.     nextText *     : IntuiTextPtr;    (* pointer to another IntuiText to render *)
  696.   END; (* IntuiText *)
  697.  
  698. (* ======================================================================== *)
  699. (* === Border ============================================================= *)
  700. (* ======================================================================== *)
  701. (* Data type Border, used for drawing a series of lines which is intended for
  702.  * use as a border drawing, but which may, in fact, be used to render any
  703.  * arbitrary vector shape.
  704.  * The routine DrawBorder sets up the RastPort with the appropriate
  705.  * variables, then does a Move to the first coordinate, then does Draws
  706.  * to the subsequent coordinates.
  707.  * After all the Draws are done, if NextBorder is non-zero we call DrawBorder
  708.  * on NextBorder
  709.  *)
  710.  
  711. TYPE
  712.  
  713.   Border * = RECORD
  714.     leftEdge *, topEdge * : INTEGER;  (* initial offsets from the origin *)
  715.     frontPen *, backPen * : SHORTINT; (* pens numbers for rendering *)
  716.     drawMode *     : s.SET8;          (* mode for rendering *)
  717.     count *        : SHORTINT;        (* number of XY pairs *)
  718.     xy *           : e.APTR;          (* vector coordinate pairs rel to LeftTop *)
  719.     nextBorder *   : BorderPtr;       (* pointer to any other Border too *)
  720.   END; (* Border *)
  721.  
  722. (* ======================================================================== *)
  723. (* === Image ============================================================== *)
  724. (* ======================================================================== *)
  725. (* This is a brief image structure for very simple transfers of
  726.  * image data to a RastPort
  727.  *)
  728.  
  729. TYPE
  730.  
  731.   Image * = RECORD
  732.     leftEdge *     : INTEGER;  (* starting offset relative to some origin *)
  733.     topEdge *      : INTEGER;  (* starting offsets relative to some origin *)
  734.     width *        : INTEGER;  (* pixel size (though data is word-aligned) *)
  735.     height *       : INTEGER;
  736.     depth *        : INTEGER;  (* >= 0, for images you create          *)
  737.     imageData *    : e.APTR;   (* pointer to the actual word-aligned bits *)
  738.  
  739.     (* the PlanePick and PlaneOnOff variables work much the same way as the
  740.      * equivalent GELS Bob variables.  It's a space-saving
  741.      * mechanism for image data.  Rather than defining the image data
  742.      * for every plane of the RastPort, you need define data only
  743.      * for the planes that are not entirely zero or one.  As you
  744.      * define your Imagery, you will often find that most of the planes
  745.      * ARE just as color selectors.  For instance, if you're designing
  746.      * a two-color Gadget to use colors one and three, and the Gadget
  747.      * will reside in a five-plane display, bit plane zero of your
  748.      * imagery would be all ones, bit plane one would have data that
  749.      * describes the imagery, and bit planes two through four would be
  750.      * all zeroes.  Using these flags avoids wasting all
  751.      * that memory in this way:  first, you specify which planes you
  752.      * want your data to appear in using the PlanePick variable.  For
  753.      * each bit set in the variable, the next "plane" of your image
  754.      * data is blitted to the display.  For each bit clear in this
  755.      * variable, the corresponding bit in PlaneOnOff is examined.
  756.      * If that bit is clear, a "plane" of zeroes will be used.
  757.      * If the bit is set, ones will go out instead.  So, for our example:
  758.      *   Gadget.PlanePick * = 02H;
  759.      *   Gadget.PlaneOnOff * = 01H;
  760.      * Note that this also allows for generic Gadgets, like the
  761.      * System Gadgets, which will work in any number of bit planes.
  762.      * Note also that if you want an Image that is only a filled
  763.      * rectangle, you can get this by setting PlanePick to zero
  764.      * (pick no planes of data) and set PlaneOnOff to describe the pen
  765.      * color of the rectangle.
  766.      *
  767.      * NOTE:  Intuition relies on PlanePick to know how many planes
  768.      * of data are found in ImageData.  There should be no more
  769.      * '1'-bits in PlanePick than there are planes in ImageData.
  770.      *)
  771.     planePick *, planeOnOff * : s.SET8;
  772.  
  773.     (* if the NextImage variable is not NULL, Intuition presumes that
  774.      * it points to another Image structure with another Image to be
  775.      * rendered
  776.      *)
  777.     nextImage *    : ImagePtr;
  778.   END; (* Image *)
  779.  
  780. (* ======================================================================== *)
  781. (* === IntuiMessage ======================================================= *)
  782. (* ======================================================================== *)
  783.  
  784. TYPE
  785.  
  786.   IntuiMessageBase *= RECORD (e.MessageBase) END;
  787.   IntuiMessageBasePtr *= POINTER TO IntuiMessageBase;
  788.  
  789.   IntuiMessage * = RECORD (IntuiMessageBase)
  790.     execMessage *  : e.Message;
  791.     (* the Class bits correspond directly with the IDCMP Flags, except for the
  792.      * special bit idcmpLONELYMESSAGE (defined below)
  793.      *)
  794.     class *        : s.SET32;
  795.  
  796.     (* the Code field is for special values like MENU number *)
  797.     code *         : e.UWORD;
  798.  
  799.     (* the Qualifier field is a copy of the current InputEvent's Qualifier *)
  800.     qualifier *    : s.SET16;
  801.  
  802.     (* IAddress contains particular addresses for Intuition functions, like
  803.      * the pointer to the Gadget or the Screen
  804.      *)
  805.     iAddress *     : e.APTR;
  806.  
  807.     (* when getting mouse movement reports, any event you get will have the
  808.      * the mouse coordinates in these variables.  the coordinates are relative
  809.      * to the upper-left corner of your Window (WflgGIMMEZEROZERO
  810.      * notwithstanding).  If idcmpDELTAMOVE is set, these values will
  811.      * be deltas from the last reported position.
  812.      *)
  813.     mouseX *, mouseY * : INTEGER;
  814.  
  815.     (* the time values are copies of the current system clock time.  Micros
  816.      * are in units of microseconds, Seconds in seconds.
  817.      *)
  818.     time *         : t.TimeVal;
  819.  
  820.     (* the IDCMPWindow variable will always have the address of the Window of
  821.      * this IDCMP
  822.      *)
  823.     idcmpWindow *  : WindowPtr;
  824.  
  825.     (* system-use variable *)
  826.     specialLink *  : IntuiMessagePtr;
  827.   END; (* IntuiMessage *)
  828.  
  829. (* New for V39:
  830.  * All IntuiMessages are now slightly extended.  The ExtIntuiMessage
  831.  * structure has an additional field for tablet data, which is usually
  832.  * NULL.  If a tablet driver which is sending ie.subClassNewTablet
  833.  * events is installed in the system, windows with the WA_TabletMessages
  834.  * property set will find that tabletData points to the TabletData
  835.  * structure.  Applications must first check that this field is non-NULL;
  836.  * it will be NULL for certain kinds of message, including mouse activity
  837.  * generated from other than the tablet (i.e. the keyboard equivalents
  838.  * or the mouse itself).
  839.  *
  840.  * NEVER EVER examine any extended fields when running under pre-V39!
  841.  *
  842.  * NOTE: This structure is subject to grow in the future.  Making
  843.  * assumptions about its size is A BAD IDEA.
  844.  *)
  845.  
  846.   ExtIntuiMessage * = RECORD (IntuiMessageBase)
  847.     intuiMessage * : IntuiMessage;
  848.     tabletData *   : TabletDataPtr;
  849.   END;
  850.  
  851.  
  852. CONST
  853.  
  854. (* --- IDCMP Classes ------------------------------------------------------ *)
  855. (* Please refer to the Autodoc for OpenWindow() and to the Rom Kernel
  856.  * Manual for full details on the IDCMP classes.
  857.  *)
  858.   sizeVerify *        = 0;
  859.   newSize *           = 1;
  860.   refreshWindow *     = 2;
  861.   mouseButtons *      = 3;
  862.   mouseMove *         = 4;
  863.   gadgetDown *        = 5;
  864.   gadgetUp *          = 6;
  865.   reqSet *            = 7;
  866.   menuPick *          = 8;
  867.   closeWindow *       = 9;
  868.   rawKey *            = 10;
  869.   reqVerify *         = 11;
  870.   reqClear *          = 12;
  871.   menuVerify *        = 13;
  872.   newPrefs *          = 14;
  873.   diskInserted *      = 15;
  874.   diskRemoved *       = 16;
  875.   wBenchMessage *     = 17;  (*  System use only         *)
  876.   activeWindow *      = 18;
  877.   inactiveWindow *    = 19;
  878.   deltaMove *         = 20;
  879.   vanillaKey *        = 21;
  880.   intuiTicks *        = 22;
  881. (*  for notifications from "boopsi" gadgets     *)
  882.   idcmpUpdate *       = 23;  (* new for V36      *)
  883. (* for getting help key report during menu session      *)
  884.   menuHelp *          = 24;  (* new for V36      *)
  885. (* for notification of any move/size/zoom/change window         *)
  886.   changeWindow *      = 25;  (* new for V36      *)
  887.   gadgetHelp *        = 26;  (* new for V39      *)
  888.  
  889. (* NOTEZ-BIEN:                          31 is reserved for internal use   *)
  890.  
  891. (* the IDCMP Flags do not use this special bit, which is cleared when
  892.  * Intuition sends its special message to the Task, and set when Intuition
  893.  * gets its Message back from the Task.  Therefore, I can check here to
  894.  * find out fast whether or not this Message is available for me to send
  895.  *)
  896.   lonelyMessage *     = 31;
  897.  
  898.  
  899. (* --- IDCMP Codes -------------------------------------------------------- *)
  900. (* This group of codes is for the idcmpChangeWindow message *)
  901.   cwcodeMoveSize *  = 00000H; (* Window was moved and/or sized *)
  902.   cwcodeDepth *     = 00001H; (* Window was depth-arranged (new for V39) *)
  903.  
  904. (* This group of codes is for the idcmpMenuVerify function *)
  905.   menuHot *         = 0001H;  (* IntuiWants verification or MenuCancel    *)
  906.   menuCancel *      = 0002H;  (* Hot Reply of this cancels Menu operation *)
  907.   menuWaiting *     = 0003H;  (* Intuition simply wants a ReplyMsg() ASAP *)
  908.  
  909. (* These are internal tokens to represent state of verification attempts
  910.  * shown here as a clue.
  911.  *)
  912.   okOk *            = menuHot; (* guy didn't care                      *)
  913.   okAbort *         = 0004H;  (* window rendered question moot        *)
  914.   okCancel *        = menuCancel; (* window sent cancel reply          *)
  915.  
  916. (* This group of codes is for the idcmpWBenchMessage messages *)
  917.   wbenchOpen *      = 0001H;
  918.   wbenchClose *     = 0002H;
  919.  
  920. TYPE
  921.  
  922. (* A data structure common in V36 Intuition processing  *)
  923.  
  924.   IBox * = RECORD
  925.     left *   : INTEGER;
  926.     top *    : INTEGER;
  927.     width *  : INTEGER;
  928.     height * : INTEGER;
  929.   END; (* IBox *)
  930.  
  931. (* ======================================================================== *)
  932. (* === Window ============================================================= *)
  933. (* ======================================================================== *)
  934.  
  935. TYPE
  936.  
  937.   Window * = RECORD
  938.     nextWindow *   : WindowPtr;        (* for the linked list in a screen *)
  939.  
  940.     leftEdge *, topEdge * : INTEGER;   (* screen dimensions of window *)
  941.     width *, height * : INTEGER;       (* screen dimensions of window *)
  942.  
  943.     mouseY *, mouseX * : INTEGER;      (* relative to upper-left of window *)
  944.  
  945.     minWidth *, minHeight * : INTEGER; (* minimum sizes *)
  946.     maxWidth *, maxHeight * : e.UWORD; (* maximum sizes *)
  947.  
  948.     flags *        : s.SET32;          (* see below for defines *)
  949.  
  950.     menuStrip *    : MenuPtr;          (* the strip of Menu headers *)
  951.  
  952.     title *        : e.LSTRPTR;        (* the title text for this window *)
  953.  
  954.     firstRequest * : RequesterPtr;     (* all active Requesters *)
  955.  
  956.     dmRequest *    : RequesterPtr;     (* double-click Requester *)
  957.  
  958.     reqCount *     : INTEGER;          (* count of reqs blocking Window *)
  959.  
  960.     wScreen *      : ScreenPtr;        (* this Window's Screen *)
  961.     rPort *        : gfx.RastPortPtr;  (* this Window's very own gfx.RastPort *)
  962.  
  963.     (* the border variables describe the window border.  If you specify
  964.      * wflgGIMMEZEROZERO when you open the window, then the upper-left of
  965.      * the ClipRect for this window will be upper-left of the gfx.BitMap (with
  966.      * correct offsets when in SuperBitMap mode; you MUST select
  967.      * wflgGIMMEZEROZERO when using SuperBitMap).  If you don't specify
  968.      * ZeroZero, then you save memory (no allocation of RastPort, Layer,
  969.      * ClipRect and associated Bitmaps), but you also must offset all your
  970.      * writes by BorderTop, BorderLeft and do your own mini-clipping to
  971.      * prevent writing over the system gadgets
  972.      *)
  973.     borderLeft *, borderTop *, borderRight *, borderBottom * : SHORTINT;
  974.     borderRPort *  : gfx.RastPortPtr;
  975.  
  976.  
  977.     (* You supply a linked-list of Gadgets for your Window.
  978.      * This list DOES NOT include system gadgets.  You get the standard
  979.      * window system gadgets by setting flag-bits in the variable Flags (see
  980.      * the bit definitions below)
  981.      *)
  982.     firstGadget *  : GadgetPtr;
  983.  
  984.     (* these are for opening/closing the windows *)
  985.     parent *, descendant * : WindowPtr;
  986.  
  987.     (* sprite data information for your own Pointer
  988.      * set these AFTER you Open the Window by calling SetPointer()
  989.      *)
  990.     pointer *      : e.APTR;           (* sprite data *)
  991.     ptrHeight *    : SHORTINT;         (* sprite height (not including sprite padding) *)
  992.     ptrWidth *     : SHORTINT;         (* sprite width (must be less than or equal to 16) *)
  993.     xOffset *, yOffset * : SHORTINT;   (* sprite offsets *)
  994.  
  995.     (* the IDCMP Flags and User's and Intuition's Message Ports *)
  996.     idcmpFlags *   : s.SET32;          (* User-selected flags *)
  997.     userPort *, windowPort * : e.MsgPortPtr;
  998.     messageKey *   : IntuiMessagePtr;
  999.  
  1000.     detailPen *, blockPen * : SHORTINT;(* for bar/border/gadget rendering *)
  1001.  
  1002.     (* the CheckMark is a pointer to the imagery that will be used when
  1003.      * rendering MenuItems of this Window that want to be checkmarked
  1004.      * if this is equal to NULL, you'll get the default imagery
  1005.      *)
  1006.     checkMark *    : ImagePtr;
  1007.  
  1008.     screenTitle *  : e.LSTRPTR;         (* if non-null, Screen title when Window is active *)
  1009.  
  1010.     (* These variables have the mouse coordinates relative to the
  1011.      * inner-Window of wflgGIMMEZEROZERO Windows.  This is compared with the
  1012.      * MouseX and MouseY variables, which contain the mouse coordinates
  1013.      * relative to the upper-left corner of the Window, wflgGIMMEZEROZERO
  1014.      * notwithstanding
  1015.      *)
  1016.     gzzMouseX *    : INTEGER;
  1017.     gzzMouseY *    : INTEGER;
  1018.     (* these variables contain the width and height of the inner-Window of
  1019.      * wflgGIMMEZEROZERO Windows
  1020.      *)
  1021.     gzzWidth *     : INTEGER;
  1022.     gzzHeight *    : INTEGER;
  1023.  
  1024.     extData *      : e.APTR;
  1025.  
  1026.     userData *     : e.APTR;           (* general-purpose pointer to User data extension *)
  1027.  
  1028.     (** 11/18/85: this pointer keeps a duplicate of what
  1029.      * Window.RPort->Layer is supposed to be pointing at
  1030.      *)
  1031.     wLayer *       : gfx.LayerPtr;
  1032.  
  1033.     (* NEW 1.2: need to keep track of the font that
  1034.      * OpenWindow opened, in case user SetFont's into RastPort
  1035.      *)
  1036.     iFont *        : gfx.TextFontPtr;
  1037.  
  1038.     (* (V36) another flag word (the Flags field is used up).
  1039.      * At present, all flag values are system private.
  1040.      * Until further notice, you may not change nor use this field.
  1041.      *)
  1042.     moreFlags      : s.SET32;
  1043.  
  1044.     (**** Data beyond this point are Intuition Private.  DO NOT USE ****)
  1045.   END; (* Window *)
  1046.  
  1047.  
  1048. CONST
  1049.  
  1050. (* --- Flags requested at OpenWindow() time by the application --------- *)
  1051.   windowSizing   * = 0;      (* include sizing system-gadget? *)
  1052.   windowDrag     * = 1;      (* include dragging system-gadget? *)
  1053.   windowDepth    * = 2;      (* include depth arrangement gadget? *)
  1054.   windowClose    * = 3;      (* include close-box system-gadget? *)
  1055.  
  1056.   sizeBRight     * = 4;      (* size gadget uses right border *)
  1057.   sizeBBottom    * = 5;      (* size gadget uses bottom border *)
  1058.  
  1059. (* --- refresh modes ------------------------------------------------------ *)
  1060. (* combinations of the refreshBits select the refresh type *)
  1061.   refreshBits *   = {6,7};
  1062.   smartRefresh *  = {};
  1063.   simpleRefresh * = 6;
  1064.   superBitmap *   = 7;
  1065.   otherRefresh *  = {6,7};
  1066.  
  1067.   backDrop *      = 8;   (* this is a backdrop window *)
  1068.  
  1069.   reportMouse *   = 9;   (* to hear about every mouse move *)
  1070.  
  1071.   gimmeZeroZero * = 10;  (* a GimmeZeroZero window       *)
  1072.  
  1073.   borderless *    = 11;  (* to get a Window sans border *)
  1074.  
  1075.   activate *      = 12;  (* when Window opens, it's Active *)
  1076.  
  1077.  
  1078. (* --- Other User Flags --------------------------------------------------- *)
  1079.   rmbTrap *        = 16;  (* Catch RMB events for your own *)
  1080.   noCareRefresh *  = 17;  (* not to be bothered with REFRESH *)
  1081.  
  1082. (* - V36 new Flags which the programmer may specify in NewWindow.Flags  *)
  1083.   nwExtended *     = 18;  (* extension data provided      *)
  1084.                               (* see struct ExtNewWindow      *)
  1085.  
  1086. (* - V39 new Flags which the programmer may specify in NewWindow.Flags  *)
  1087.   newLookMenus *   = 21;  (* window has NewLook menus     *)
  1088.  
  1089.  
  1090. (* These flags are set only by Intuition.  YOU MAY NOT SET THEM YOURSELF! *)
  1091.   windowActive *   = 13;  (* this window is the active one *)
  1092.   inRequest *      = 14;  (* this window is in request mode *)
  1093.   menuState *      = 15;  (* Window is active with Menus on *)
  1094.   windowRefresh *  = 24;  (* Window is currently refreshing *)
  1095.   wbenchWindow *   = 25;  (* WorkBench tool ONLY Window *)
  1096.   windowTicked *   = 26;  (* only one timer tick at a time *)
  1097.  
  1098. (* V36 and higher flags to be set only by Intuition: *)
  1099.   visitor *        = 27;  (* visitor window               *)
  1100.   zoomed *         = 28;  (* identifies "zoom state"      *)
  1101.   hasZoom *        = 29;  (* windowhas a zoom gadget      *)
  1102.  
  1103.  
  1104. (* --- Other Window Values ---------------------------------------------- *)
  1105.   defaultMouseQueue *       = 5;     (* no more mouse messages       *)
  1106.  
  1107. (* --- see struct IntuiMessage for the IDCMP Flag definitions ------------- *)
  1108.  
  1109. (* ======================================================================== *)
  1110. (* === NewWindow ========================================================== *)
  1111. (* ======================================================================== *)
  1112. (*
  1113.  * Note that the new extension fields have been removed.  Use ExtNewWindow
  1114.  * structure below to make use of these fields
  1115.  *)
  1116.  
  1117. TYPE
  1118.  
  1119.   NewWindowBase *= RECORD END;
  1120.   NewWindowBasePtr *= POINTER TO NewWindowBase;
  1121.  
  1122.   NewWindow * = RECORD (NewWindowBase)
  1123.     leftEdge *, topEdge * : INTEGER;   (* screen dimensions of window *)
  1124.     width *, height * : INTEGER;       (* screen dimensions of window *)
  1125.  
  1126.     detailPen *, blockPen * : SHORTINT;(* for bar/border/gadget rendering *)
  1127.  
  1128.     idcmpFlags *   : s.SET32;          (* User-selected IDCMP flags *)
  1129.  
  1130.     flags *        : s.SET32;          (* see Window struct for defines *)
  1131.  
  1132.     (* You supply a linked-list of Gadgets for your Window.
  1133.      *  This list DOES NOT include system Gadgets.  You get the standard
  1134.      *  system Window Gadgets by setting flag-bits in the variable Flags (see
  1135.      *  the bit definitions under the Window structure definition)
  1136.      *)
  1137.     firstGadget *  : GadgetPtr;
  1138.  
  1139.     (* the CheckMark is a pointer to the imagery that will be used when
  1140.      * rendering MenuItems of this Window that want to be checkmarked
  1141.      * if this is equal to NULL, you'll get the default imagery
  1142.      *)
  1143.     checkMark *    : ImagePtr;
  1144.  
  1145.     title *        : e.LSTRPTR;         (* the title text for this window *)
  1146.  
  1147.     (* the Screen pointer is used only if you've defined a CUSTOMSCREEN and
  1148.      * want this Window to open in it.  If so, you pass the address of the
  1149.      * Custom Screen structure in this variable.  Otherwise, this variable
  1150.      * is ignored and doesn't have to be initialized.
  1151.      *)
  1152.     screen *       : ScreenPtr;
  1153.  
  1154.     (* wflgSuperBITMAP Window?  If so, put the address of your gfx.BitMap
  1155.      * structure in this variable.  If not, this variable is ignored and
  1156.      * doesn't have to be initialized
  1157.      *)
  1158.     bitMap *       : gfx.BitMapPtr;
  1159.  
  1160.     (* the values describe the minimum and maximum sizes of your Windows.
  1161.      * these matter only if you've chosen the wflgSIZEGADGET option,
  1162.      * which means that you want to let the User to change the size of
  1163.      * this Window.  You describe the minimum and maximum sizes that the
  1164.      * Window can grow by setting these variables.  You can initialize
  1165.      * any one these to zero, which will mean that you want to duplicate
  1166.      * the setting for that dimension (if MinWidth == 0, MinWidth will be
  1167.      * set to the opening Width of the Window).
  1168.      * You can change these settings later using SetWindowLimits().
  1169.      * If you haven't asked for a SIZING Gadget, you don't have to
  1170.      * initialize any of these variables.
  1171.      *)
  1172.     minWidth *, minHeight * : INTEGER; (* minimums *)
  1173.     maxWidth *, maxHeight * : e.UWORD; (* maximums *)
  1174.  
  1175.     (* the type variable describes the Screen in which you want this Window to
  1176.      * open.  The type value can either be CUSTOMSCREEN or one of the
  1177.      * system standard Screen Types such as WBENCHSCREEN.  See the
  1178.      * type definitions under the Screen structure.
  1179.      *)
  1180.     type *         : s.SET16;
  1181.  
  1182.   END; (* NewWindow *)
  1183.  
  1184. (* The following structure is the future NewWindow.  Compatibility
  1185.  * issues require that the size of NewWindow not change.
  1186.  * Data in the common part (NewWindow) indicates the the extension
  1187.  * fields ara being used.
  1188.  * NOTE WELL: This structure may be subject to future extension.
  1189.  * Writing code depending on its size is not allowed.
  1190.  *)
  1191.  
  1192.   ExtNewWindow * = RECORD (NewWindowBase)
  1193.     nw * : NewWindow;
  1194.  
  1195.     (* ------------------------------------------------------- *
  1196.      * extensions for V36
  1197.      * if the NewWindow Flag value wflgNwEXTENDED is set, then
  1198.      * this field is assumed to point to an array ( or chain of arrays)
  1199.      * of TagItem structures.  See also ExtNewScreen for another
  1200.      * use of TagItems to pass optional data.
  1201.      *
  1202.      * see below for tag values and the corresponding data.
  1203.      *)
  1204.     extension * : u.TagListPtr;
  1205.   END; (* ExtNewWindow *)
  1206.  
  1207. CONST
  1208.  
  1209. (*
  1210.  * The TagItem ID's (tiTag values) for OpenWindowTagList() follow.
  1211.  * They are values in a TagItem array passed as extension/replacement
  1212.  * values for the data in NewWindow.  OpenWindowTagList() can actually
  1213.  * work well with a NULL NewWindow pointer.
  1214.  *)
  1215.  
  1216.   waDummy *        = u.user + 99; (* 80000063H   *)
  1217.  
  1218. (* these tags simply override NewWindow parameters *)
  1219.   waLeft *                 = waDummy + 01H;
  1220.   waTop *                  = waDummy + 02H;
  1221.   waWidth *                = waDummy + 03H;
  1222.   waHeight *               = waDummy + 04H;
  1223.   waDetailPen *            = waDummy + 05H;
  1224.   waBlockPen *             = waDummy + 06H;
  1225.   waIDCMP *                = waDummy + 07H;
  1226.                         (* "bulk" initialization of NewWindow.Flags *)
  1227.   waFlags *                = waDummy + 08H;
  1228.   waGadgets *              = waDummy + 09H;
  1229.   waCheckmark *            = waDummy + 0AH;
  1230.   waTitle *                = waDummy + 0BH;
  1231.                         (* means you don't have to call SetWindowTitles
  1232.                          * after you open your window
  1233.                          *)
  1234.   waScreenTitle *          = waDummy + 0CH;
  1235.   waCustomScreen *         = waDummy + 0DH;
  1236.   waSuperBitMap *          = waDummy + 0EH;
  1237.                         (* also implies wflgSuperBITMAP property      *)
  1238.   waMinWidth *             = waDummy + 0FH;
  1239.   waMinHeight *            = waDummy + 10H;
  1240.   waMaxWidth *             = waDummy + 11H;
  1241.   waMaxHeight *            = waDummy + 12H;
  1242.  
  1243. (* The following are specifications for new features    *)
  1244.  
  1245.   waInnerWidth *           = waDummy + 13H;
  1246.   waInnerHeight *          = waDummy + 14H;
  1247.                         (* You can specify the dimensions of the interior
  1248.                          * region of your window, independent of what
  1249.                          * the border widths will be.  You probably want
  1250.                          * to also specify waAutoAdjust to allow
  1251.                          * Intuition to move your window or even
  1252.                          * shrink it so that it is completely on screen.
  1253.                          *)
  1254.  
  1255.   waPubScreenName *        = waDummy + 15H;
  1256.                         (* declares that you want the window to open as
  1257.                          * a visitor on the public screen whose name is
  1258.                          * pointed to by (e.UBYTE * ) tiData
  1259.                          *)
  1260.   waPubScreen *            = waDummy + 16H;
  1261.                         (* open as a visitor window on the public screen
  1262.                          * whose address is in (struct Screen * ) tiData.
  1263.                          * To ensure that this screen remains open, you
  1264.                          * should either be the screen's owner, have a
  1265.                          * window open on the screen, or use LockPubScreen().
  1266.                          *)
  1267.   waPubScreenFallBack *    = waDummy + 17H;
  1268.                         (* A Boolean, specifies whether a visitor window
  1269.                          * should "fall back" to the default public screen
  1270.                          * (or Workbench) if the named public screen isn't
  1271.                          * available
  1272.                          *)
  1273.   waWindowName *           = waDummy + 18H;
  1274.                         (* not implemented      *)
  1275.   waColors *               = waDummy + 19H;
  1276.                         (* a ColorSpec array for colors to be set
  1277.                          * when this window is active.  This is not
  1278.                          * implemented, and may not be, since the default
  1279.                          * values to restore would be hard to track.
  1280.                          * We'd like to at least support per-window colors
  1281.                          * for the mouse pointer sprite.
  1282.                          *)
  1283.   waZoom *         = waDummy + 1AH;
  1284.                         (* tiData points to an array of four INTEGER's,
  1285.                          * the initial Left/Top/Width/Height values of
  1286.                          * the "alternate" zoom position/dimensions.
  1287.                          * It also specifies that you want a Zoom gadget
  1288.                          * for your window, whether or not you have a
  1289.                          * sizing gadget.
  1290.                          *)
  1291.   waMouseQueue *           = waDummy + 1BH;
  1292.                         (* tiData contains initial value for the mouse
  1293.                          * message backlog limit for this window.
  1294.                          *)
  1295.   waBackFill *             = waDummy + 1CH;
  1296.                         (* unimplemented at present: provides a "backfill
  1297.                          * hook" for your window's layer.
  1298.                          *)
  1299.   waRptQueue *             = waDummy + 1DH;
  1300.                         (* initial value of repeat key backlog limit    *)
  1301.  
  1302.     (* These Boolean tag items are alternatives to the NewWindow.Flags
  1303.      * boolean flags with similar names.
  1304.      *)
  1305.   waSizeGadget *           = waDummy + 1EH;
  1306.   waDragBar *              = waDummy + 1FH;
  1307.   waDepthGadget *          = waDummy + 20H;
  1308.   waCloseGadget *          = waDummy + 21H;
  1309.   waBackdrop *             = waDummy + 22H;
  1310.   waReportMouse *          = waDummy + 23H;
  1311.   waNoCareRefresh *        = waDummy + 24H;
  1312.   waBorderless *           = waDummy + 25H;
  1313.   waActivate *             = waDummy + 26H;
  1314.   waRMBTrap *              = waDummy + 27H;
  1315.   waWBenchWindow  *        = waDummy + 28H;       (* PRIVATE!! *)
  1316.   waSimpleRefresh *        = waDummy + 29H;
  1317.                         (* only specify if TRUE *)
  1318.   waSmartRefresh *         = waDummy + 2AH;
  1319.                         (* only specify if TRUE *)
  1320.   waSizeBRight *           = waDummy + 2BH;
  1321.   waSizeBBottom *          = waDummy + 2CH;
  1322.  
  1323.     (* New Boolean properties   *)
  1324.   waAutoAdjust *           = waDummy + 2DH;
  1325.                         (* shift or squeeze the window's position and
  1326.                          * dimensions to fit it on screen.
  1327.                          *)
  1328.  
  1329.   waGimmeZeroZero *        = waDummy + 2EH;
  1330.                         (* equiv. to NewWindow.Flags wflgGIMMEZEROZERO *)
  1331.  
  1332. (* New for V37: waMenuHelp (ignored by V36) *)
  1333.   waMenuHelp *             = waDummy + 2FH;
  1334.                         (* Enables idcmpMENUHELP:  Pressing HELP during menus
  1335.                          * will return idcmpMENUHELP message.
  1336.                          *)
  1337.  
  1338. (* New for V39:  (ignored by V37 and earlier) *)
  1339.   waNewLookMenus * = waDummy + 30H;
  1340.                         (* Set to TRUE if you want NewLook menus *)
  1341.   waAmigaKey * = waDummy + 31H;
  1342.                         (* Pointer to image for Amiga-key equiv in menus *)
  1343.   waNotifyDepth * = waDummy + 32H;
  1344.                         (* Requests idcmpChangeWindow message when
  1345.                          * window is depth arranged
  1346.                          * (imsg->Code = cwCodeDepth)
  1347.                          *)
  1348.  
  1349. (* waDummy + 33H is obsolete *)
  1350.  
  1351.   waPointer * = waDummy + 34H;
  1352.                         (* Allows you to specify a custom pointer
  1353.                          * for your window.  ti_Data points to a
  1354.                          * pointer object you obtained via
  1355.                          * "pointerclass". NULL signifies the
  1356.                          * default pointer.
  1357.                          * This tag may be passed to OpenWindowTags()
  1358.                          * or SetWindowPointer().
  1359.                          *)
  1360.  
  1361.   waBusyPointer * = waDummy + 35H;
  1362.                         (* ti_Data is boolean.  Set to TRUE to
  1363.                          * request the standard busy pointer.
  1364.                          * This tag may be passed to OpenWindowTags()
  1365.                          * or SetWindowPointer().
  1366.                          *)
  1367.  
  1368.   waPointerDelay * = waDummy + 36H;
  1369.                         (* ti_Data is boolean.  Set to TRUE to
  1370.                          * request that the changing of the
  1371.                          * pointer be slightly delayed.  The change
  1372.                          * will be called off if you call NewSetPointer()
  1373.                          * before the delay expires.  This allows
  1374.                          * you to post a busy-pointer even if you think
  1375.                          * the busy-time may be very short, without
  1376.                          * fear of a flashing pointer.
  1377.                          * This tag may be passed to OpenWindowTags()
  1378.                          * or SetWindowPointer().
  1379.                          *)
  1380.  
  1381.   waTabletMessages * = waDummy + 37H;
  1382.                         (* ti_Data is a boolean.  Set to TRUE to
  1383.                          * request that tablet information be included
  1384.                          * in IntuiMessages sent to your window.
  1385.                          * Requires that something (i.e. a tablet driver)
  1386.                          * feed ie.subClassNewTablet InputEvents into
  1387.                          * the system.  For a pointer to the TabletData,
  1388.                          * examine the ExtIntuiMessage.tabletData
  1389.                          * field.  It is UNSAFE to check this field
  1390.                          * when running on pre-V39 systems.  It's always
  1391.                          * safe to check this field under V39 and up,
  1392.                          * though it may be NULL.
  1393.                          *)
  1394.  
  1395.   waHelpGroup * = waDummy + 38H;
  1396.                         (* When the active window has gadget help enabled,
  1397.                          * other windows of the same HelpGroup number
  1398.                          * will also get GadgetHelp.  This allows GadgetHelp
  1399.                          * to work for multi-windowed applications.
  1400.                          * Use GetGroupID() to get an ID number.  Pass
  1401.                          * this number as ti_Data to all your windows.
  1402.                          * See also the HelpControl() function.
  1403.                          *)
  1404.  
  1405.   waHelpGroupWindow * = waDummy + 39H;
  1406.                         (* When the active window has gadget help enabled,
  1407.                          * other windows of the same HelpGroup will also get
  1408.                          * GadgetHelp.  This allows GadgetHelp to work
  1409.                          * for multi-windowed applications.  As an alternative
  1410.                          * to WA_HelpGroup, you can pass a pointer to any
  1411.                          * other window of the same group to join its help
  1412.                          * group.  Defaults to NULL, which has no effect.
  1413.                          * See also the HelpControl() function.
  1414.                          *)
  1415.  
  1416.  
  1417. (* HelpControl() flags:
  1418.  *
  1419.  * hcGadgetHelp - Set this flag to enable Gadget-Help for one or more
  1420.  * windows.
  1421.  *)
  1422.  
  1423.   hcGadgetHelp * = 1;
  1424.  
  1425. (*
  1426. **  $VER: screens.h 38.25 (15.2.93)
  1427. **
  1428. **  The Screen and NewScreen structures and attributes
  1429. *)
  1430.  
  1431.  
  1432. (* ======================================================================== *)
  1433. (* === DrawInfo ========================================================= *)
  1434. (* ======================================================================== *)
  1435.  
  1436. (* This is a packet of information for graphics rendering.  It originates
  1437.  * with a Screen, and is gotten using GetScreenDrawInfo( screen );
  1438.  *)
  1439.  
  1440. CONST
  1441.  
  1442. (* You can use the Intuition version number to tell which fields are
  1443.  * present in this structure.
  1444.  *
  1445.  * driVersion of 1 corresponds to V37 release.
  1446.  * driVersion of 2 corresponds to V39, and includes three new pens
  1447.  *      and the checkMark and amigaKey fields.
  1448.  *
  1449.  * Note that sometimes applications need to create their own DrawInfo
  1450.  * structures, in which case the driVersion won't correspond exactly
  1451.  * to the OS version!!!
  1452.  *)
  1453.   driVersion *     = 2;
  1454.  
  1455. TYPE
  1456.  
  1457.   DrawInfo * = RECORD
  1458.     version *      : e.UWORD;        (* will be  driVersion                 *)
  1459.     numPens *      : e.UWORD;        (* guaranteed to be >= numDrIPens       *)
  1460.     pens *         : DRIPenArrayPtr; (* pointer to pen array                 *)
  1461.  
  1462.     font *         : gfx.TextFontPtr;  (* screen default font          *)
  1463.     depth *        : e.UWORD;        (* (initial) depth of screen bitmap     *)
  1464.  
  1465.     resolution *   : gfx.Point;        (* from DisplayInfo database for initial display mode *)
  1466.  
  1467.     flags *        : s.SET32;        (* defined below                *)
  1468. (* New for V39: checkMark, amigaKey. *)
  1469.     checkMark *    : ImagePtr;       (* pointer to scaled checkmark image
  1470.                                       * Will be NULL if DRI_VERSION < 2
  1471.                                       *)
  1472.     amigaKey *     : ImagePtr;       (* pointer to scaled Amiga-key image
  1473.                                       * Will be NULL if DRI_VERSION < 2
  1474.                                       *)
  1475.     reserved *     : ARRAY 5 OF e.ULONG; (* avoid recompilation ;^)      *)
  1476.   END; (* DrawInfo *)
  1477.  
  1478. CONST
  1479.  
  1480.   drifNewLook *      = 0;       (* specified saPens, full treatment *)
  1481.  
  1482. (* rendering pen number indexes into DrawInfo.driPens[]        *)
  1483.   detailPen *        = 0;       (* compatible Intuition rendering pens  *)
  1484.   blockPen *         = 1;       (* compatible Intuition rendering pens  *)
  1485.   textPen *          = 2;       (* text on background                   *)
  1486.   shinePen *         = 3;       (* bright edge on 3D objects            *)
  1487.   shadowPen *        = 4;       (* dark edge on 3D objects              *)
  1488.   fillPen *          = 5;       (* active-window/selected-gadget fill   *)
  1489.   fillTextPen *      = 6;       (* text over FILLPEN                    *)
  1490.   backGroundPen *    = 7;       (* always color 0                       *)
  1491.   highLightTextPen * = 8;       (* special color text, on background    *)
  1492. (* New for V39, only present if driVersion >= 2: *)
  1493.   barDetailPen *     = 9;       (* text/detail in screen-bar/menus *)
  1494.   barBlockPen *      = 10;      (* screen-bar/menus fill *)
  1495.   barTrimPen *       = 11;      (* trim under screen-bar *)
  1496.  
  1497.   numDRIPens *       = 9;
  1498.  
  1499.  
  1500. (* New for V39:  It is sometimes useful to specify that a pen value
  1501.  * is to be the complement of color zero to three.  The "magic" numbers
  1502.  * serve that purpose:
  1503.  *)
  1504.   penC3 * = 0FEFCH;                     (* Complement of color 3 *)
  1505.   penC2 * = 0FEFDH;                     (* Complement of color 2 *)
  1506.   penC1 * = 0FEFEH;                     (* Complement of color 1 *)
  1507.   penC0 * = 0FEFFH;                     (* Complement of color 0 *)
  1508.  
  1509. TYPE
  1510.  
  1511.   DRIPenArray * = ARRAY numDRIPens OF e.UWORD;
  1512.  
  1513. (* ======================================================================== *)
  1514. (* === Screen ============================================================= *)
  1515. (* ======================================================================== *)
  1516.  
  1517. (* VERY IMPORTANT NOTE ABOUT Screen->BitMap.  In the future, bitmaps
  1518.  * will need to grow.  The embedded instance of a bitmap in the screen
  1519.  * will no longer be large enough to hold the whole description of
  1520.  * the bitmap.
  1521.  *
  1522.  * YOU ARE STRONGLY URGED to use Screen.rastPort.bitMap in place of
  1523.  * SYS.ADR (Screen.bitMap) whenever and whereever possible.
  1524.  *)
  1525.  
  1526. TYPE
  1527.  
  1528.   Screen * = RECORD
  1529.     nextScreen *   : ScreenPtr;        (* linked list of screens *)
  1530.     firstWindow *  : WindowPtr;        (* linked list Screen's Windows *)
  1531.  
  1532.     leftEdge *, topEdge * : INTEGER;   (* parameters of the screen *)
  1533.     width *, height * : INTEGER;       (* parameters of the screen *)
  1534.  
  1535.     mouseY *, mouseX * : INTEGER;      (* position relative to upper-left *)
  1536.  
  1537.     flags *        : s.SET16;          (* see definitions below *)
  1538.  
  1539.     title *        : e.LSTRPTR;         (* null-terminated Title text *)
  1540.     defaultTitle * : e.LSTRPTR;         (* for Windows without ScreenTitle *)
  1541.  
  1542.     (* Bar sizes for this Screen and all Window's in this Screen *)
  1543.     (* Note that BarHeight is one less than the actual menu bar
  1544.      * height.  We're going to keep this in V36 for compatibility,
  1545.      * although V36 artwork might use that extra pixel
  1546.      *
  1547.      * Also, the title bar height of a window is calculated from the
  1548.      * screen's WBorTop field, plus the font height, plus one.
  1549.      *)
  1550.     barHeight *,
  1551.     barVBorder *, barHBorder *,
  1552.     menuVBorder *, menuHBorder * : SHORTINT;
  1553.     wBorTop *, wBorLeft *, wBorRight *, wBorBottom * : SHORTINT;
  1554.  
  1555.     font *         : gfx.TextAttrPtr;    (* this screen's default font      *)
  1556.  
  1557.     (* the display data structures for this Screen *)
  1558.     viewPort *     : gfx.ViewPort;       (* describing the Screen's display *)
  1559.     rastPort *     : gfx.RastPort;       (* describing Screen rendering     *)
  1560.     bitMap *       : gfx.BitMap;         (* extra copy of RastPort gfx.BitMap   *)
  1561.     layerInfo *    : gfx.LayerInfo;      (* each screen gets a LayerInfo    *)
  1562.  
  1563.     (* Only system gadgets may be attached to a screen.
  1564.      *  You get the standard system Screen Gadgets automatically
  1565.      *)
  1566.     firstGadget *  : GadgetPtr;
  1567.  
  1568.     detailPen *, blockPen * : SHORTINT; (* for bar/border/gadget rendering *)
  1569.  
  1570.     (* the following variable(s) are maintained by Intuition to support the
  1571.      * DisplayBeep() color flashing technique
  1572.      *)
  1573.     saveColor0 *   : e.UWORD;
  1574.  
  1575.     (* This layer is for the Screen and Menu bars *)
  1576.     barLayer *     : gfx.LayerPtr;
  1577.  
  1578.     extData *      : e.APTR;
  1579.  
  1580.     userData *     : e.APTR;           (* general-purpose pointer to User data extension *)
  1581.  
  1582.     (**** Data below this point are SYSTEM PRIVATE ****)
  1583.   END; (* Screen *)
  1584.  
  1585.  
  1586. CONST
  1587.  
  1588. (* --- FLAGS SET BY INTUITION --------------------------------------------- *)
  1589. (* The SCREENTYPE bits are reserved for describing various Screen types
  1590.  * available under Intuition.
  1591.  *)
  1592.   screenType *      = {0..3};  (* all the screens types available      *)
  1593. (* --- the definitions for the Screen Type ------------------------------- *)
  1594.   wbenchScreen *    = 0;  (* identifies the Workbench screen      *)
  1595.   publicScreen *    = 1;  (* public shared (custom) screen        *)
  1596.   customScreen *    = {0..3};  (* original custom screens              *)
  1597.  
  1598.   showTitle *       = 4;  (* this gets set by a call to ShowTitle() *)
  1599.  
  1600.   beeping *         = 5;  (* set when Screen is beeping (private) *)
  1601.  
  1602.   customBitmap *    = 6;  (* if you are supplying your own gfx.BitMap *)
  1603.  
  1604.   screenBehind *    = 7;  (* if you want your screen to open behind
  1605.                            * already open screens
  1606.                            *)
  1607.   screenQuiet * = 8;      (* if you do not want Intuition to render
  1608.                            * into your screen (gadgets, title)
  1609.                            *)
  1610.   screenHires *     = 9;  (* do not use lowres gadgets  (private) *)
  1611.  
  1612.   nsExtended *     = 12;  (* ExtNewScreen.Extension is valid      *)
  1613. (* V36 applications can use OpenScreenTagList() instead of nsEXTENDED  *)
  1614.  
  1615.   autoScroll *      = 14; (* screen is to autoscoll               *)
  1616.  
  1617. (* New for V39: *)
  1618.   penshared *       = 10; (* Screen opener set {saSharePens,TRUE} *)
  1619.  
  1620.   stdScreenHeight * = -1;      (* supply in NewScreen.Height           *)
  1621.   stdScreenWidth *  = -1;      (* supply in NewScreen.Width            *)
  1622.  
  1623. (*
  1624.  * Screen attribute tag ID's.  These are used in the tiTag field of
  1625.  * TagItem arrays passed to OpenScreenTagList() (or in the
  1626.  * ExtNewScreen.Extension field).
  1627.  *)
  1628.  
  1629. (* Screen attribute tags.  Please use these versions, not those in
  1630.  * iobsolete.h.
  1631.  *)
  1632.  
  1633.   saDummy *        = u.user + 32;
  1634. (*
  1635.  * these items specify items equivalent to fields in NewScreen
  1636.  *)
  1637.   saLeft *         = saDummy + 0001H;
  1638.   saTop *          = saDummy + 0002H;
  1639.   saWidth *        = saDummy + 0003H;
  1640.   saHeight *       = saDummy + 0004H;
  1641.                      (* traditional screen positions and dimensions  *)
  1642.   saDepth *        = saDummy + 0005H;
  1643.                      (* screen bitmap depth                          *)
  1644.   saDetailPen *    = saDummy + 0006H;
  1645.                      (* serves as default for windows, too           *)
  1646.   saBlockPen *     = saDummy + 0007H;
  1647.   saTitle *        = saDummy + 0008H;
  1648.                      (* default screen title                         *)
  1649.   saColors *       = saDummy + 0009H;
  1650.                      (* tiData is an array of struct ColorSpec,
  1651.                       * terminated by ColorIndex * = -1.  Specifies
  1652.                       * initial screen palette colors.
  1653.                       *)
  1654.   saErrorCode *    = saDummy + 000AH;
  1655.                      (* data points to LONGINT error code (values below)*)
  1656.   saFont *         = saDummy + 000BH;
  1657.                      (* equiv. to NewScreen.Font                     *)
  1658.   saSysFont *      = saDummy + 000CH;
  1659.                      (* Selects one of the preferences system fonts:
  1660.                       *      0 - old DefaultFont, fixed-width
  1661.                       *      1 - WB Screen preferred font
  1662.                       *)
  1663.   saType *         = saDummy + 000DH;
  1664.                      (* data is publicScreen or customScreen.  For other
  1665.                       * fields of NewScreen.type, see individual tags,
  1666.                       * eg. saBehind, saQuiet.
  1667.                       *)
  1668.   saBitMap *       = saDummy + 000EH;
  1669.                      (* tiData is pointer to custom gfx.BitMap.  This
  1670.                       * implies type of customBitmap
  1671.                       *)
  1672.   saPubName *      = saDummy + 000FH;
  1673.                      (* presence of this tag means that the screen
  1674.                       * is to be a public screen.  Please specify
  1675.                       * BEFORE the two tags below
  1676.                       *)
  1677.   saPubSig *       = saDummy + 0010H;
  1678.   saPubTask *      = saDummy + 0011H;
  1679.                      (* Task ID and signal for being notified that
  1680.                       * the last window has closed on a public screen.
  1681.                       *)
  1682.   saDisplayID *    = saDummy + 0012H;
  1683.                      (* data is new extended display ID from
  1684.                       * <graphics/displayinfo.h> (V37) or from
  1685.                       * <graphics/modeid.h> (V39 and up)
  1686.                       *)
  1687.   saDClip *        = saDummy + 0013H;
  1688.                      (* data points to a rectangle which defines
  1689.                       * screen display clip region
  1690.                       *)
  1691.   saOverscan *     = saDummy + 0014H;
  1692.                      (* Set to one of the oscan*
  1693.                       * specifiers below to get a system standard
  1694.                       * overscan region for your display clip,
  1695.                       * screen dimensions (unless otherwise specified),
  1696.                       * and automatically centered position (partial
  1697.                       * support only so far).
  1698.                       * If you use this, you shouldn't specify
  1699.                       * saDClip.  saOverscan is for "standard"
  1700.                       * overscan dimensions, saDClip is for
  1701.                       * your custom numeric specifications.
  1702.                       *)
  1703.   saObsolete1 *    = saDummy + 0015H;
  1704.                      (* obsolete sMonitorName                       *)
  1705.  
  1706. (** booleans **)
  1707.   saShowTitle *    = saDummy + 0016H;
  1708.                      (* boolean equivalent to flag showTitle         *)
  1709.   saBehind *       = saDummy + 0017H;
  1710.                      (* boolean equivalent to flag screenBehind      *)
  1711.   saQuiet *        = saDummy + 0018H;
  1712.                      (* boolean equivalent to flag screenQuiet       *)
  1713.   saAutoScroll *   = saDummy + 0019H;
  1714.                      (* boolean equivalent to flag autoScroll        *)
  1715.   saPens *         = saDummy + 001AH;
  1716.                      (* pointer to ~0 terminated e.UWORD array, as
  1717.                       * found in struct DrawInfo
  1718.                       *)
  1719.   saFullPalette *  = saDummy + 001BH;
  1720.                      (* boolean: initialize color table to entire
  1721.                       * preferences palette (32 for V36), rather
  1722.                       * than compatible pens 0-3, 17-19, with
  1723.                       * remaining palette as returned by GetColorMap()
  1724.                       *)
  1725.  
  1726.   saColorMapEntries * = saDummy + 001CH;
  1727.                      (* New for V39:
  1728.                       * Allows you to override the number of entries
  1729.                       * in the ColorMap for your screen.  Intuition
  1730.                       * normally allocates (1<<depth) or 32, whichever
  1731.                       * is more, but you may require even more if you
  1732.                       * use certain V39 graphics.library features
  1733.                       * (eg. palette-banking).
  1734.                       *)
  1735.  
  1736.   saParent *        = saDummy + 001DH;
  1737.                       (* New for V39:
  1738.                        * ti_Data is a pointer to a "parent" screen to
  1739.                        * attach this one to.  Attached screens slide
  1740.                        * and depth-arrange together.
  1741.                        *)
  1742.  
  1743.   saDraggable *      = saDummy + 001EH;
  1744.                        (* New for V39:
  1745.                         * Boolean tag allowing non-draggable screens.
  1746.                         * Do not use without good reason!
  1747.                         * (Defaults to TRUE).
  1748.                         *)
  1749.  
  1750.   saExclusive *       = saDummy + 001FH;
  1751.                         (* New for V39:
  1752.                          * Boolean tag allowing screens that won't share
  1753.                          * the display.  Use sparingly!  Starting with 3.01,
  1754.                          * attached screens may be SA_Exclusive.  Setting
  1755.                          * SA_Exclusive for each screen will produce an
  1756.                          * exclusive family.   (Defaults to FALSE).
  1757.                          *)
  1758.  
  1759.   saSharePens *        = saDummy + 0020H;
  1760.                          (* New for V39:
  1761.                           * For those pens in the screen's DrawInfo->dri_Pens,
  1762.                           * Intuition obtains them in shared mode (see
  1763.                           * graphics.library/ObtainPen()).  For compatibility,
  1764.                           * Intuition obtains the other pens of a public
  1765.                           * screen as PEN_EXCLUSIVe.  Screens that wish to
  1766.                           * manage the pens themselves should generally set
  1767.                           * this tag to TRUe.  This instructs Intuition to
  1768.                           * leave the other pens unallocated.
  1769.                           *)
  1770.  
  1771.   saBackFill *         = saDummy + 0021H;
  1772.                         (* New for V39:
  1773.                          * provides a "backfill hook" for your screen's
  1774.                          * Layer_Info.
  1775.                          * See layers.library/InstallLayerInfoHook()
  1776.                          *)
  1777.  
  1778.   saInterleaved *      = saDummy + 0022H;
  1779.                         (* New for V39:
  1780.                          * Boolean tag requesting that the bitmap
  1781.                          * allocated for you be interleaved.
  1782.                          * (Defaults to FALSE).
  1783.                          *)
  1784.  
  1785.   saColors32 *         = saDummy + 0023H;
  1786.                         (* New for V39:
  1787.                          * Tag to set the screen's initial palette colors
  1788.                          * at 32 bits-per-gun.  ti_Data is a pointer
  1789.                          * to a table to be passed to the
  1790.                          * graphics.library/LoadRGB32() function.
  1791.                          * This format supports both runs of color
  1792.                          * registers and sparse registers.  See the
  1793.                          * autodoc for that function for full details.
  1794.                          * Any color set here has precedence over
  1795.                          * the same register set by SA_Colors.
  1796.                          *)
  1797.  
  1798.   saVideoControl *     = saDummy + 0024H;
  1799.                         (* New for V39:
  1800.                          * ti_Data is a pointer to a taglist that Intuition
  1801.                          * will pass to graphics.library/VideoControl(),
  1802.                          * upon opening the screen.
  1803.                          *)
  1804.  
  1805.   saFrontChild *       = saDummy + 0025H;
  1806.                         (* New for V39:
  1807.                          * ti_Data is a pointer to an already open screen
  1808.                          * that is to be the child of the screen being
  1809.                          * opened.  The child screen will be moved to the
  1810.                          * front of its family.
  1811.                          *)
  1812.  
  1813.   saBackChild *        = saDummy + 0026H;
  1814.                         (* New for V39:
  1815.                          * ti_Data is a pointer to an already open screen
  1816.                          * that is to be the child of the screen being
  1817.                          * opened.  The child screen will be moved to the
  1818.                          * back of its family.
  1819.                          *)
  1820.  
  1821.   saLikeWorkbench *    = saDummy + 0027H;
  1822.                         (* New for V39:
  1823.                          * Set ti_Data to 1 to request a screen which
  1824.                          * is just like the Workbench.  This gives
  1825.                          * you the same screen mode, depth, size,
  1826.                          * colors, etc., as the Workbench screen.
  1827.                          *)
  1828.  
  1829.   saReserved *         = saDummy + 0028H;
  1830.                         (* Reserved for private Intuition use *)
  1831.  
  1832.   saMinimizeISG *      = saDummy + 0029H;
  1833.                         (* New for V40:
  1834.                          * For compatibility, Intuition always ensures
  1835.                          * that the inter-screen gap is at least three
  1836.                          * non-interlaced lines.  If your application
  1837.                          * would look best with the smallest possible
  1838.                          * inter-screen gap, set ti_Data to TRUe.
  1839.                          * If you use the new graphics VideoControl()
  1840.                          * VC_NoColorPaletteLoad tag for your screen's
  1841.                          * ViewPort, you should also set this tag.
  1842.                          *)
  1843.  
  1844. (* this is an obsolete tag included only for compatibility with V35
  1845.  * interim release for the A2024 and Viking monitors
  1846.  *)
  1847.   nstagExtVPMode * = u.user + 1;
  1848.  
  1849.  
  1850. (* OpenScreen error codes, which are returned in the (optional) LONGINT
  1851.  * pointed to by tiData for the saErrorCode tag item
  1852.  *)
  1853.   osErrNoMonitor *    = 1;  (* named monitor spec not available     *)
  1854.   osErrNoChips *      = 2;  (* you need newer custom chips          *)
  1855.   osErrNoMem *        = 3;  (* couldn't get normal memory           *)
  1856.   osErrNoChipMem *    = 4;  (* couldn't get chipmem                 *)
  1857.   osErrPubNotUnique * = 5;  (* public screen name already used      *)
  1858.   osErrUnknownMode *  = 6;  (* don't recognize mode asked for       *)
  1859.   oserrTooDeep *      = 7;  (* Screen deeper than HW supports       *)
  1860.   oserrAttachFail *   = 8;  (* Failed to attach screens             *)
  1861.   oserrNotAvailable * = 9;  (* Mode not available for other reason  *)
  1862.  
  1863. (* ======================================================================== *)
  1864. (* === NewScreen ========================================================== *)
  1865. (* ======================================================================== *)
  1866. (* note: to use the Extended field, you must use the
  1867.  * new ExtNewScreen structure, below
  1868.  *)
  1869.  
  1870. TYPE
  1871.  
  1872.   NewScreenBase *= RECORD END;
  1873.   NewScreenBasePtr *= POINTER TO NewScreenBase;
  1874.  
  1875.   NewScreen * = RECORD (NewScreenBase)
  1876.     leftEdge *, topEdge *,
  1877.     width *, height *, depth * : INTEGER; (* screen dimensions *)
  1878.  
  1879.     detailPen *, blockPen * : SHORTINT; (* for bar/border/gadget rendering      *)
  1880.  
  1881.     viewModes *    : s.SET16;          (* the Modes for the ViewPort (and View) *)
  1882.  
  1883.     type *         : s.SET16;          (* the Screen type (see defines above)  *)
  1884.  
  1885.     font *         : gfx.TextAttrPtr;    (* this Screen's default text attributes *)
  1886.  
  1887.     defaultTitle * : e.LSTRPTR;         (* the default title for this Screen    *)
  1888.  
  1889.     gadgets *      : GadgetPtr;        (* UNUSED:  Leave this NULL             *)
  1890.  
  1891.     (* if you are opening a CUSTOMSCREEN and already have a gfx.BitMap
  1892.      * that you want used for your Screen, you set the flags CUSTOMBITMAP in
  1893.      * the Type field and you set this variable to point to your gfx.BitMap
  1894.      * structure.  The structure will be copied into your Screen structure,
  1895.      * after which you may discard your own gfx.BitMap if you want
  1896.      *)
  1897.     customBitMap * : gfx.BitMapPtr;
  1898. END; (* NewScreen *)
  1899.  
  1900. (*
  1901.  * For compatibility reasons, we need a new structure for extending
  1902.  * NewScreen.  Use this structure is you need to use the new Extension
  1903.  * field.
  1904.  *
  1905.  * NOTE: V36-specific applications should use the
  1906.  * OpenScreenTagList( newscreen, tags ) version of OpenScreen().
  1907.  * Applications that want to be V34-compatible as well may safely use the
  1908.  * ExtNewScreen structure.  Its tags will be ignored by V34 Intuition.
  1909.  *
  1910.  *)
  1911.  
  1912.   ExtNewScreen * = RECORD (NewScreenBase)
  1913.     ns * : NewScreen;
  1914.     extension * : u.TagListPtr;
  1915.                                 (* more specification data, scanned if
  1916.                                  * nsExtended is set in NewScreen.type
  1917.                                  *)
  1918.   END; (* ExtNewScreen *)
  1919.  
  1920. CONST
  1921.  
  1922. (* === Overscan Types ===       *)
  1923.   oScanText *      = 1;     (* entirely visible     *)
  1924.   oScanStandard *  = 2;     (* just past edges      *)
  1925.   oScanMax *       = 3;     (* as much as possible  *)
  1926.   oScanVideo *     = 4;     (* even more than is possible   *)
  1927.  
  1928. (* === Public Shared Screen Node ===    *)
  1929.  
  1930. (* This is the representative of a public shared screen.
  1931.  * This is an internal data structure, but some functions may
  1932.  * present a copy of it to the calling application.  In that case,
  1933.  * be aware that the screen pointer of the structure can NOT be
  1934.  * used safely, since there is no guarantee that the referenced
  1935.  * screen will remain open and a valid data structure.
  1936.  *
  1937.  * Never change one of these.
  1938.  *)
  1939.  
  1940. TYPE
  1941.  
  1942.   PubScreenNode * = RECORD (e.NodeBase)
  1943.     node *         : e.Node;        (* name is screen name *)
  1944.     screen *       : ScreenPtr;
  1945.     flags *        : s.SET16;       (* below                *)
  1946.     size *         : INTEGER;       (* includes name buffer *)
  1947.     visitorCount * : INTEGER;       (* how many visitor windows *)
  1948.     sigTask *      : e.TaskPtr;     (* who to signal when visitors gone *)
  1949.     sigBit *       : SHORTINT;      (* which signal *)
  1950.   END; (* PubScreenNode *)
  1951.  
  1952. CONST
  1953.  
  1954.   psnfPrivate *    = 0;
  1955.  
  1956. (* NOTE: Due to a bug in NextPubScreen(), make sure your buffer
  1957.  * actually has maxPubScreenName+1 characters in it!
  1958.  *)
  1959.   maxPubScreenName * = 139;   (* names no longer, please      *)
  1960.  
  1961. (* pub screen modes     *)
  1962.   shanghai *        = 0;  (* put workbench windows on pub screen *)
  1963.   popPubScreen *    = 1;  (* pop pub screen to front when visitor opens *)
  1964.  
  1965. (* New for V39:  Intuition has new screen depth-arrangement and movement
  1966.  * functions called ScreenDepth() and ScreenPosition() respectively.
  1967.  * These functions permit the old behavior of ScreenToFront(),
  1968.  * ScreenToBack(), and MoveScreen().  ScreenDepth() also allows
  1969.  * independent depth control of attached screens.  ScreenPosition()
  1970.  * optionally allows positioning screens even though they were opened
  1971.  * {saDraggable,FALSE}.
  1972.  *)
  1973.  
  1974. (* For ScreenDepth(), specify one of sDepthToFront or sDepthToBack,
  1975.  * and optionally also sDepthInFamily.
  1976.  *
  1977.  * NOTE: ONLY THE OWNER OF THE SCREEN should ever specify
  1978.  * sDepthInFamily.  Commodities, "input helper" programs,
  1979.  * or any other program that did not open a screen should never
  1980.  * use that flag.  (Note that this is a style-behavior
  1981.  * requirement;  there is no technical requirement that the
  1982.  * task calling this function need be the task which opened
  1983.  * the screen).
  1984.  *)
  1985.  
  1986.   sdepthToFront *  = 0;  (* Bring screen to front *)
  1987.   sdepthToBack *   = 1;  (* Send screen to back *)
  1988.   sdepthInFamily * = 2;  (* Move an attached screen with
  1989.                           * respect to other screens of
  1990.                           * its family
  1991.                           *)
  1992.  
  1993. (* Here's an obsolete name equivalent to sDepthInFamily: *)
  1994.   sdepthChildOnly * = sdepthInFamily;
  1995.  
  1996.  
  1997. (* For ScreenPosition(), specify one of sPosRelative, sPosAbsolute,
  1998.  * or sPosMakeVisible to describe the kind of screen positioning you
  1999.  * wish to perform:
  2000.  *
  2001.  * sPosRelative: The x1 and y1 parameters to ScreenPosition() describe
  2002.  *      the offset in coordinates you wish to move the screen by.
  2003.  * sPosAbsolute: The x1 and y1 parameters to ScreenPosition() describe
  2004.  *      the absolute coordinates you wish to move the screen to.
  2005.  * sPosMakeVisible: (x1,y1)-(x2,y2) describes a rectangle on the
  2006.  *      screen which you would like autoscrolled into view.
  2007.  *
  2008.  * You may additionally set sPosForceDrag along with any of the
  2009.  * above.  Set this if you wish to reposition an {saDraggable,FALSE}
  2010.  * screen that you opened.
  2011.  *
  2012.  * NOTE: ONLY THE OWNER OF THE SCREEN should ever specify
  2013.  * sPosForceDrag.  Commodities, "input helper" programs,
  2014.  * or any other program that did not open a screen should never
  2015.  * use that flag.
  2016.  *)
  2017.  
  2018.   sposRelative *    = {};   (* Coordinates are relative *)
  2019.  
  2020.   sposAbsolute *    = {0};  (* Coordinates are expressed as
  2021.                              * absolutes, not relatives.
  2022.                              *)
  2023.  
  2024.   sposMakeVisible * = {1};  (* Coordinates describe a box on
  2025.                              * the screen you wish to be
  2026.                              * made visible by autoscrolling
  2027.                              *)
  2028.  
  2029.   sposForceDrag * = {2};    (* Move non-draggable screen *)
  2030.  
  2031. (* New for V39: Intuition supports double-buffering in screens,
  2032.  * with friendly interaction with menus and certain gadgets.
  2033.  * For each buffer, you need to get one of these structures
  2034.  * from the AllocScreenBuffer() call.  Never allocate your
  2035.  * own ScreenBuffer structures!
  2036.  *
  2037.  * The sbDBufInfo field is for your use.  See the graphics.library
  2038.  * AllocDBufInfo() autodoc for details.
  2039.  *)
  2040.  
  2041. TYPE
  2042.  
  2043.   ScreenBuffer * = RECORD
  2044.     bitMap *   : gfx.BitMapPtr;
  2045.     dBufInfo * : gfx.DBufInfoPtr;
  2046.   END;
  2047.  
  2048. CONST
  2049.  
  2050. (* These are the flags that may be passed to AllocScreenBuffer().
  2051.  *)
  2052.   sbScreenBitmap * = 0;
  2053.   sbCopyBitmap *   = 1;
  2054.  
  2055. (*
  2056. **  $VER: preferences.h 38.2 (16.9.92)
  2057. **
  2058. **  Structure definition for old-style preferences
  2059. *)
  2060.  
  2061.  
  2062. (* ======================================================================== *)
  2063. (* === Preferences ======================================================== *)
  2064. (* ======================================================================== *)
  2065.  
  2066. CONST
  2067.  
  2068. (* these are the definitions for the printer configurations *)
  2069.   filenameSize *   = 30;               (* Filename size *)
  2070.   devNameSize * = 16;                  (* Device-name size *)
  2071.  
  2072.   pointerSize * = (1 + 16 + 1) * 2;    (* Size of Pointer data buffer *)
  2073.  
  2074. (* These defines are for the default font size.  These actually describe the
  2075.  * height of the defaults fonts.  The default font type is the topaz
  2076.  * font, which is a fixed width font that can be used in either
  2077.  * eighty-column or sixty-column mode.  The Preferences structure reflects
  2078.  * which is currently selected by the value found in the variable FontSize,
  2079.  * which may have either of the values defined below.  These values actually
  2080.  * are used to select the height of the default font.  By changing the
  2081.  * height, the resolution of the font changes as well.
  2082.  *)
  2083.   topazEighty * = 8;
  2084.   topazSixty * = 9;
  2085.  
  2086. (* Note:  Starting with V36, and continuing with each new version of
  2087.  * Intuition, an increasing number of fields of struct Preferences
  2088.  * are ignored by SetPrefs().  (Some fields are obeyed only at the
  2089.  * initial SetPrefs(), which comes from the devs:system-configuration
  2090.  * file).  Elements are generally superseded as new hardware or software
  2091.  * features demand more information than fits in struct Preferences.
  2092.  * Parts of struct Preferences must be ignored so that applications
  2093.  * calling GetPrefs(), modifying some other part of struct Preferences,
  2094.  * then calling SetPrefs(), don't end up truncating the extended
  2095.  * data.
  2096.  *
  2097.  * Consult the autodocs for SetPrefs() for further information as
  2098.  * to which fields are not always respected.
  2099.  *)
  2100.  
  2101. TYPE
  2102.  
  2103.   Filename * = ARRAY filenameSize OF CHAR;
  2104.  
  2105.   Preferences * = RECORD
  2106.     (* the default font height *)
  2107.     fontHeight *   : SHORTINT;         (* height for system default font  *)
  2108.  
  2109.     (* constant describing what's hooked up to the port *)
  2110.     printerPort *  : SHORTINT;         (* printer port connection         *)
  2111.  
  2112.     (* the baud rate of the port *)
  2113.     baudRate *     : e.UWORD;          (* baud rate for the serial port   *)
  2114.  
  2115.     (* various timing rates *)
  2116.     oeyRptSpeed *  : t.TimeVal;        (* repeat spemd for keyboard       *)
  2117.     oeyRptDelay *  : t.TimeVal;        (* Delay before keys repeat        *)
  2118.     doubleClick *  : t.TimeVal;        (* Interval allowed between clicks *)
  2119.  
  2120.     (* Intuition Pointer data *)
  2121.     pointerMatrix * : ARRAY pointerSize OF e.UWORD; (* Definition of pointer sprite    *)
  2122.     xOffset *      : SHORTINT;         (* X-Offset for active 'bit'       *)
  2123.     yOffset *      : SHORTINT;         (* Y-Offset for active 'bit'       *)
  2124.     color17 *      : e.UWORD;          (***********************************)
  2125.     color18 *      : e.UWORD;          (* Colours for sprite pointer      *)
  2126.     color19 *      : e.UWORD;          (***********************************)
  2127.     pointerTicks * : e.UWORD;          (* Sensitivity of the pointer      *)
  2128.  
  2129.     (* Workbench Screen colors *)
  2130.     color0 *       : e.UWORD;          (***********************************)
  2131.     color1 *       : e.UWORD;          (*  Standard default colours       *)
  2132.     color2 *       : e.UWORD;          (*   Used in the Workbench         *)
  2133.     color3 *       : e.UWORD;          (***********************************)
  2134.  
  2135.     (* positioning data for the Intuition View *)
  2136.     viewXOffset *  : SHORTINT;         (* Offset for top lefthand corner  *)
  2137.     viewYOffset *  : SHORTINT;         (* X and Y dimensions              *)
  2138.     viewInitX *, ViewInitY * : INTEGER; (* View initial offset values      *)
  2139.  
  2140.     enableCLI *    : s.SET16;          (* CLI availability switch *)
  2141.  
  2142.     (* printer configurations *)
  2143.     printerType *  : e.UWORD;          (* printer type            *)
  2144.     printerFilename * : Filename;      (* file for printer       *)
  2145.  
  2146.     (* print format and quality configurations *)
  2147.     printPitch *   : e.UWORD;          (* print pitch                     *)
  2148.     printQuality * : e.UWORD;          (* print quality                   *)
  2149.     printSpacing * : e.UWORD;          (* number of lines per inch        *)
  2150.     printLeftMargin * : e.UWORD;       (* left margin in characters       *)
  2151.     printRightMargin * : e.UWORD;      (* right margin in characters      *)
  2152.     printImage *   : e.UWORD;          (* positive or negative            *)
  2153.     printAspect *  : e.UWORD;          (* horizontal or vertical          *)
  2154.     printShade *   : e.UWORD;          (* b&w, half-tone, or color        *)
  2155.     printThreshold * : INTEGER;        (* darkness ctrl for b/w dumps     *)
  2156.  
  2157.     (* print paper descriptors *)
  2158.     paperSize *    : e.UWORD;          (* paper size                      *)
  2159.     paperLength *  : e.UWORD;          (* paper length in number of lines *)
  2160.     paperType *    : e.UWORD;          (* continuous or single sheet      *)
  2161.  
  2162.     (* Serial device settings: These are six nibble-fields in three bytes *)
  2163.     (* (these look a little strange so the defaults will map out to zero) *)
  2164.     serRWBits *    : e.UBYTE;          (* upper nibble * = (8-number of read bits)      *)
  2165.                                        (* lower nibble * = (8-number of write bits)     *)
  2166.     serStopBuf *   : e.UBYTE;          (* upper nibble * = (number of stop bits - 1)    *)
  2167.                                        (* lower nibble * = (table value for BufSize)    *)
  2168.     serParShk *    : e.UBYTE;          (* upper nibble * = (value for Parity setting)   *)
  2169.                                        (* lower nibble * = (value for Handshake mode)   *)
  2170.     laceWB *       : s.SET8;           (* if workbench is to be interlaced            *)
  2171.  
  2172.     pad *          : ARRAY 12 OF e.UBYTE;
  2173.     prtDevName *   : ARRAY devNameSize OF CHAR; (* device used by printer.device
  2174.                                         * (omit the ".device")
  2175.                                         *)
  2176.     defaultPrtUnit * :  SHORTINT;      (* default unit opened by printer.device *)
  2177.     defaultSerUnit * :  SHORTINT;      (* default serial unit *)
  2178.  
  2179.     rowSizeChange * : SHORTINT;        (* affect NormalDisplayRows/Columns     *)
  2180.     columnSizeChange * : SHORTINT;
  2181.  
  2182.     printFlags *   : s.SET16;          (* user preference flags *)
  2183.     printMaxWidth * : e.UWORD;         (* max width of printed picture in 10ths/in *)
  2184.     printMaxHeight * : e.UWORD;        (* max height of printed picture in 10ths/in *)
  2185.     printDensity * : SHORTINT;         (* print density *)
  2186.     printXOffset * : SHORTINT;         (* offset of printed picture in 10ths/inch *)
  2187.  
  2188.     width *        : e.UWORD;          (* override default workbench width  *)
  2189.     height *       : e.UWORD;          (* override default workbench height *)
  2190.     depth *        : SHORTINT;         (* override default workbench depth  *)
  2191.  
  2192.     extSize *      : SHORTINT;         (* extension information -- do not touch! *)
  2193.                                        (* extension size in blocks of 64 bytes *)
  2194.   END; (* Preferences *)
  2195.  
  2196.  
  2197. CONST
  2198.  
  2199. (* Workbench Interlace (use one bit) *)
  2200.   laceWB *         = 0;
  2201.   lwReserved *     = 1;               (* internal use only *)
  2202.  
  2203. (* EnableCLI   *)
  2204.   screenDrag *     = 14;
  2205.   mouseAccel *     = 15;
  2206.  
  2207. (* PrinterPort *)
  2208.   parallelPrinter * = 00H;
  2209.   serialPrinter *   = 01H;
  2210.  
  2211. (* BaudRate *)
  2212.   baud110 *        = 00H;
  2213.   baud300 *        = 01H;
  2214.   baud1200 *       = 02H;
  2215.   baud2400 *       = 03H;
  2216.   baud4800 *       = 04H;
  2217.   baud9600 *       = 05H;
  2218.   baud19200 *      = 06H;
  2219.   baudMidi *       = 07H;
  2220.  
  2221. (* PaperType *)
  2222.   fanfold * = 00H;
  2223.   single *          = 80H;
  2224.  
  2225. (* PrintPitch *)
  2226.   pica *            = 000H;
  2227.   elite *           = 400H;
  2228.   fine *            = 800H;
  2229.  
  2230. (* PrintQuality *)
  2231.   draft *           = 000H;
  2232.   letter *          = 100H;
  2233.  
  2234. (* PrintSpacing *)
  2235.   sixLPI *         = 000H;
  2236.   eightLPI *       = 200H;
  2237.  
  2238. (* Print Image *)
  2239.   imagePositive *  = 00H;
  2240.   imageNegative *  = 01H;
  2241.  
  2242. (* PrintAspect *)
  2243.   aspectHoriz *    = 00H;
  2244.   aspectVert *     = 01H;
  2245.  
  2246. (* PrintShade *)
  2247.   shadeBW *        = 00H;
  2248.   shadeGreyscale * = 01H;
  2249.   shadeColor *     = 02H;
  2250.  
  2251. (* PaperSize (all paper sizes have a zero in the lowest nybble) *)
  2252.   usLetter *       = 00H;
  2253.   usLegal *        = 10H;
  2254.   nTractor *       = 20H;
  2255.   wTractor *       = 30H;
  2256.   custom *         = 40H;
  2257.  
  2258. (* New PaperSizes for V36: *)
  2259.   euroA0 * =  50H;            (* European size A0: 841 x 1189 *)
  2260.   euroA1 * =  60H;            (* European size A1: 594 x 841 *)
  2261.   euroA2 * =  70H;            (* European size A2: 420 x 594 *)
  2262.   euroA3 * =  80H;            (* European size A3: 297 x 420 *)
  2263.   euroA4 * =  90H;            (* European size A4: 210 x 297 *)
  2264.   euroA5 * = 0A0H;            (* European size A5: 148 x 210 *)
  2265.   euroA6 * = 0B0H;            (* European size A6: 105 x 148 *)
  2266.   euroA7 * = 0C0H;            (* European size A7: 74 x 105 *)
  2267.   euroA8 * = 0D0H;            (* European size A8: 52 x 74 *)
  2268.  
  2269.  
  2270. (* PrinterType *)
  2271.   customName *             = 00H;
  2272.   alphaP101 *              = 01H;
  2273.   brother15XL *            = 02H;
  2274.   cbmMps1000 *             = 03H;
  2275.   diab630 *                = 04H;
  2276.   diabAdvD25 *             = 05H;
  2277.   diabC150 *               = 06H;
  2278.   epson *                  = 07H;
  2279.   epsonJX80 *              = 08H;
  2280.   okimate20 *              = 09H;
  2281.   qumeLP20 *               = 0AH;
  2282. (* new printer entries, 3 October 1985 *)
  2283.   hpLaserjet *             = 0BH;
  2284.   hpLaserjetPlus *         = 0CH;
  2285.  
  2286. (* Serial Input Buffer Sizes *)
  2287.   buf512 *        = 00H;
  2288.   buf1024 *       = 01H;
  2289.   buf2048 *       = 02H;
  2290.   buf4096 *       = 03H;
  2291.   buf8000 *       = 04H;
  2292.   buf16000 *      = 05H;
  2293.  
  2294. (* Serial Bit Masks *)
  2295.   readBits *      = 0F0X; (* for SerRWBits   *)
  2296.   writeBits *     = 0FX;
  2297.  
  2298.   stopBits *      = 0F0X; (* for SerStopBuf  *)
  2299.   bufSizeBits *   = 0FX;
  2300.  
  2301.   parityBits *    = 0F0X; (* for SerParShk   *)
  2302.   hShakeBits *    = 0FX;
  2303.  
  2304. (* Serial Parity (upper nibble, after being shifted by
  2305.  * macro SPARNUM() )
  2306.  *)
  2307.   parityNone *     = 0;
  2308.   parityEven *     = 1;
  2309.   parityOdd *      = 2;
  2310. (* New parity definitions for V36: *)
  2311.   parityMark *     = 3;
  2312.   paritySpace *    = 4;
  2313.  
  2314. (* Serial Handshake Mode (lower nibble, after masking using
  2315.  * macro SHANKNUM() )
  2316.  *)
  2317.   shakeXon *      = 0;
  2318.   shakeRts *      = 1;
  2319.   shakeNone *     = 2;
  2320.  
  2321. (* new defines for PrintFlags *)
  2322.  
  2323.   correctRed *         = 0;  (* color correct red shades *)
  2324.   correctGreen *       = 1;  (* color correct green shades *)
  2325.   correctBlue *        = 2;  (* color correct blue shades *)
  2326.  
  2327.   centerImage *        = 3;  (* center image on paper *)
  2328.  
  2329.   ignoreDimensions *   = {}; (* ignore max width/height settings *)
  2330.   boundedDimensions *  = 4;  (* use max width/height as boundaries *)
  2331.   absoluteDimensions * = 5;  (* use max width/height as absolutes *)
  2332.   pixelDimensions *    = 6;  (* use max width/height as prt pixels *)
  2333.   multiplyDimensions * = 7; (* use max width/height as multipliers *)
  2334.  
  2335.   integerScaling *     = 8;  (* force integer scaling *)
  2336.  
  2337.   orderedDithering *   = {}; (* ordered dithering *)
  2338.   halftoneDithering *  = 9;  (* halftone dithering *)
  2339.   floydDithering *     = 10; (* Floyd-Steinberg dithering *)
  2340.  
  2341.   antiAlias *          = 11; (* anti-alias image *)
  2342.   greyScale2 *         = 12; (* for use with hi-res monitor *)
  2343.  
  2344. (* masks used for checking bits *)
  2345.  
  2346.   correctRGBMask *     = { correctRed, correctGreen, correctBlue };
  2347.   dimensionsMask *     = { boundedDimensions, absoluteDimensions, pixelDimensions, multiplyDimensions };
  2348.   ditheringMask *      = { halftoneDithering, floydDithering };
  2349.  
  2350. (*
  2351. **  $VER: intuition.h 38.26 (15.2.93)
  2352. **
  2353. **  Interface definitions for Intuition applications.
  2354. **  (Continued...)
  2355. *)
  2356.  
  2357. (* ======================================================================== *)
  2358. (* === Remember =========================================================== *)
  2359. (* ======================================================================== *)
  2360. (* this structure is used for remembering what memory has been allocated to
  2361.  * date by a given routine, so that a premature abort or systematic exit
  2362.  * can deallocate memory cleanly, easily, and completely
  2363.  *)
  2364.  
  2365. TYPE
  2366.  
  2367.   Remember * = RECORD
  2368.     nextRemember * : RememberPtr;
  2369.     rememberSize * : e.ULONG;
  2370.     memory *       : e.APTR;
  2371.   END; (* Remember *)
  2372.  
  2373. (* === Color Spec ====================================================== *)
  2374. (* How to tell Intuition about RGB values for a color table entry.
  2375.  * NOTE:  The way the structure was defined, the color value was
  2376.  * right-justified within each UWORD.  This poses problems for
  2377.  * extensibility to more bits-per-gun.  The saColors32 tag to
  2378.  * OpenScreenTags() provides an alternate way to specify colors
  2379.  * with greater precision.
  2380.  *)
  2381.  
  2382. TYPE
  2383.  
  2384.   ColorSpec * = RECORD
  2385.     colorIndex * : INTEGER;  (* -1 terminates an array of ColorSpec  *)
  2386.     red *        : e.UWORD;  (* only 6 bits recognized in V36        *)
  2387.     green *      : e.UWORD;  (* only 6 bits recognized in V36        *)
  2388.     blue *       : e.UWORD;  (* only 6 bits recognized in V36        *)
  2389.   END; (* ColorSpec *)
  2390.  
  2391. (* === Easy Requester Specification ======================================= *)
  2392. (* see also autodocs for EasyRequest and BuildEasyRequest       *)
  2393. (* NOTE: This structure may grow in size in the future          *)
  2394.  
  2395. TYPE
  2396.  
  2397.   EasyStruct * = RECORD
  2398.     structSize *   : e.ULONG;   (* should be sizeof (struct EasyStruct )*)
  2399.     flags *        : s.SET32;   (* should be 0 for now                  *)
  2400.     title *        : e.LSTRPTR;  (* title of requester window            *)
  2401.     textFormat *   : e.LSTRPTR;  (* 'printf' style formatting string     *)
  2402.     gadgetFormat * : e.LSTRPTR;  (* 'printf' style formatting string     *)
  2403.   END; (* EasyStruct *)
  2404.  
  2405. (* ======================================================================== *)
  2406. (* === Miscellaneous ====================================================== *)
  2407. (* ======================================================================== *)
  2408.  
  2409. CONST
  2410.  
  2411. (* = MENU STUFF =========================================================== *)
  2412.   noMenu *   = 001FH;
  2413.   noItem *   = 003FH;
  2414.   noSub *    = 001FH;
  2415.   menuNull * = -1; (* 0FFFFH *)
  2416.  
  2417.  
  2418. (* these defines are for the COMMSEQ and CHECKIT menu stuff.  If CHECKIT,
  2419.  * I'll use a generic Width (for all resolutions) for the CheckMark.
  2420.  * If COMMSEQ, likewise I'll use this generic stuff
  2421.  *)
  2422.   checkWidth *      = 19;
  2423.   commWidth *       = 27;
  2424.   lowCheckWidth *   = 13;
  2425.   lowCommWidth *    = 16;
  2426.  
  2427.  
  2428. (* these are the AlertNumber defines.  if you are calling DisplayAlert()
  2429.  * the AlertNumber you supply must have the alertTYPE bits set to one
  2430.  * of these patterns
  2431.  *)
  2432.   alertType *      = 80000000H;
  2433.   recoveryAlert *  = 00000000H;      (* the system can recover from this *)
  2434.   deadendAlert *   = 80000000H;      (* no recovery possible, this is it *)
  2435.  
  2436.  
  2437. (* When you're defining IntuiText for the Positive and Negative Gadgets
  2438.  * created by a call to AutoRequest(), these defines will get you
  2439.  * reasonable-looking text.  The only field without a define is the IText
  2440.  * field; you decide what text goes with the Gadget
  2441.  *)
  2442.   autoFrontPen *    = 0;
  2443.   autoBackPen *     = 1;
  2444.   autoDrawMode *    = gfx.jam2;
  2445.   autoLeftEdge *    = 6;
  2446.   autoTopEdge *     = 3;
  2447.   autoITextFont *   = NIL;
  2448.   autoNextText *    = NIL;
  2449.  
  2450.  
  2451. (* --- RAWMOUSE Codes and Qualifiers (Console OR IDCMP) ------------------- *)
  2452.   selectUp *        = ie.lButton + ie.upPrefix;
  2453.   selectDown *      = ie.lButton;
  2454.   menuUp *          = ie.rButton + ie.upPrefix;
  2455.   menuDown *        = ie.rButton;
  2456.   middleUp *        = ie.mButton + ie.upPrefix;
  2457.   middleDown *      = ie.mButton;
  2458.   altLeft *         = { ie.lAlt };
  2459.   altRight *        = { ie.rAlt };
  2460.   amigaLeft *       = { ie.lCommand };
  2461.   amigaRight *      = { ie.rCommand };
  2462.   amigaKeys *       = amigaLeft + amigaRight;
  2463.  
  2464.   cursorUp *        = 4CH;
  2465.   cursorLeft *      = 4FH;
  2466.   cursorRight *     = 4EH;
  2467.   cursorDown *      = 4DH;
  2468.   keycodeQ *        = 10H;
  2469.   keycodeZ *        = 31H;
  2470.   keycodeX *        = 32H;
  2471.   keycodeV *        = 34H;
  2472.   keycodeB *        = 35H;
  2473.   keycodeN *        = 36H;
  2474.   keycodeM *        = 37H;
  2475.   keycodeLess *     = 38H;
  2476.   keycodeGreater *  = 39H;
  2477.  
  2478. (* New for V39, Intuition supports the ie.subClassNewTablet subclass
  2479.  * of the ie.classNewPointerPos event.  The eventAddress of such
  2480.  * an event points to a TabletData structure (see below).
  2481.  *
  2482.  * The TabletData structure contains certain elements including a taglist.
  2483.  * The taglist can be used for special tablet parameters.  A tablet driver
  2484.  * should include only those tag-items the tablet supports.  An application
  2485.  * can listen for any tag-items that interest it.  Note: an application
  2486.  * must set the waTabletMessages attribute to TRUE to receive this
  2487.  * extended information in its IntuiMessages.
  2488.  *
  2489.  * The definitions given here MUST be followed.  Pay careful attention
  2490.  * to normalization and the interpretation of signs.
  2491.  *
  2492.  * tabletaTabletZ:  the current value of the tablet in the Z direction.
  2493.  * This unsigned value should typically be in the natural units of the
  2494.  * tablet.  You should also provide tabletaRangeZ.
  2495.  *
  2496.  * tabletaRangeZ:  the maximum value of the tablet in the Z direction.
  2497.  * Normally specified along with tabletaTabletZ, this allows the
  2498.  * application to scale the actual Z value across its range.
  2499.  *
  2500.  * tabletaAngleX:  the angle of rotation or tilt about the X-axis.  This
  2501.  * number should be normalized to fill a signed long integer.  Positive
  2502.  * values imply a clockwise rotation about the X-axis when viewing
  2503.  * from +X towards the origin.
  2504.  *
  2505.  * tabletaAngleY:  the angle of rotation or tilt about the Y-axis.  This
  2506.  * number should be normalized to fill a signed long integer.  Positive
  2507.  * values imply a clockwise rotation about the Y-axis when viewing
  2508.  * from +Y towards the origin.
  2509.  *
  2510.  * tabletaAngleZ:  the angle of rotation or tilt about the Z axis.  This
  2511.  * number should be normalized to fill a signed long integer.  Positive
  2512.  * values imply a clockwise rotation about the Z-axis when viewing
  2513.  * from +Z towards the origin.
  2514.  *
  2515.  *      Note: a stylus that supports tilt should use the tabletaAngleX
  2516.  *      and tabletaAngleY attributes.  Tilting the stylus so the tip
  2517.  *      points towards increasing or decreasing X is actually a rotation
  2518.  *      around the Y-axis.  Thus, if the stylus tip points towards
  2519.  *      positive X, then that tilt is represented as a negative
  2520.  *      tabletaAngleY.  Likewise, if the stylus tip points towards
  2521.  *      positive Y, that tilt is represented by positive tabletaAngleX.
  2522.  *
  2523.  * tabletaPressure:  the pressure reading of the stylus.  The pressure
  2524.  * should be normalized to fill a signed long integer.  Typical devices
  2525.  * won't generate negative pressure, but the possibility is not precluded.
  2526.  * The pressure threshold which is considered to cause a button-click is
  2527.  * expected to be set in a Preferences program supplied by the tablet
  2528.  * vendor.  The tablet driver would send ie.codeLButton-type events as
  2529.  * the pressure crossed that threshold.
  2530.  *
  2531.  * tabletaButtonBits:  ti_Data is a long integer whose bits are to
  2532.  * be interpreted at the state of the first 32 buttons of the tablet.
  2533.  *
  2534.  * tabletaInProximity:  ti_Data is a boolean.  For tablets that support
  2535.  * proximity, they should send the {tabletaInProximity,FALSE} tag item
  2536.  * when the stylus is out of proximity.  One possible use we can forsee
  2537.  * is a mouse-blanking commodity which keys off this to blank the
  2538.  * mouse.  When this tag is absent, the stylus is assumed to be
  2539.  * in proximity.
  2540.  *
  2541.  * tabletaResolutionX:  ti_Data is an unsigned long integer which
  2542.  * is the x-axis resolution in dots per inch.
  2543.  *
  2544.  * tabletaResolutionY:  ti_Data is an unsigned long integer which
  2545.  * is the y-axis resolution in dots per inch.
  2546.  *)
  2547.  
  2548. CONST
  2549.  
  2550.   tabletaDummy *       = u.user + 03A000H;
  2551.   tabletaTabletZ *     = tabletaDummy + 01H;
  2552.   tabletaRangeZ *      = tabletaDummy + 02H;
  2553.   tabletaAngleX *      = tabletaDummy + 03H;
  2554.   tabletaAngleY *      = tabletaDummy + 04H;
  2555.   tabletaAngleZ *      = tabletaDummy + 05H;
  2556.   tabletaPressure *    = tabletaDummy + 06H;
  2557.   tabletaButtonBits *  = tabletaDummy + 07H;
  2558.   tabletaInProximity * = tabletaDummy + 08H;
  2559.   tabletaResolutionX * = tabletaDummy + 09H;
  2560.   tabletaResolutionY * = tabletaDummy + 0AH;
  2561.  
  2562. (* If your window sets waTabletMessages to TRUE, then it will receive
  2563.  * extended IntuiMessages (struct ExtIntuiMessage) whose tabletData
  2564.  * field points at a TabletData structure.  This structure contains
  2565.  * additional information about the input event.
  2566.  *)
  2567.  
  2568. TYPE
  2569.  
  2570.   TabletData * = RECORD
  2571.     (* Sub-pixel position of tablet, in screen coordinates,
  2572.      * scaled to fill a UWORD fraction:
  2573.      *)
  2574.     xFraction *, yFraction * : e.UWORD;
  2575.  
  2576.     (* Current tablet coordinates along each axis: *)
  2577.     tabletX *, tabletY * : e.ULONG;
  2578.  
  2579.     (* Tablet range along each axis.  For example, if td_TabletX
  2580.      * can take values 0-999, td_RangeX should be 1000.
  2581.      *)
  2582.     rangeX *, rangeY * : e.ULONG;
  2583.  
  2584.     (* Pointer to tag-list of additional tablet attributes.
  2585.      * See <intuition/intuition.h> for the tag values.
  2586.      *)
  2587.     tagList *      : u.TagListPtr;
  2588.   END;
  2589.  
  2590. (* If a tablet driver supplies a hook for callBack, it will be
  2591.  * invoked in the standard hook manner.  A0 will point to the Hook
  2592.  * itself, A2 will point to the InputEvent that was sent, and
  2593.  * A1 will point to a TabletHookData structure.  The InputEvent's
  2594.  * ie_EventAddress field points at the IENewTablet structure that
  2595.  * the driver supplied.
  2596.  *
  2597.  * Based on the thd_Screen, thd_Width, and thd_Height fields, the driver
  2598.  * should scale the ient_TabletX and ient_TabletY fields and store the
  2599.  * result in ient_ScaledX, ient_ScaledY, ient_ScaledXFraction, and
  2600.  * ient_ScaledYFraction.
  2601.  *
  2602.  * The tablet hook must currently return NULL.  This is the only
  2603.  * acceptable return-value under V39.
  2604.  *)
  2605.  
  2606. TYPE
  2607.  
  2608.   TabletHookData * = RECORD
  2609.     (* Pointer to the active screen:
  2610.      * Note: if there are no open screens, thd_Screen will be NULL.
  2611.      * thd_Width and thd_Height will then describe an NTSC 640x400
  2612.      * screen.  Please scale accordingly.
  2613.      *)
  2614.     screen *       :  ScreenPtr;
  2615.  
  2616.     (* The width and height (measured in pixels of the active screen)
  2617.      * that your are to scale to:
  2618.      *)
  2619.     width *        :  e.ULONG;
  2620.     height *       :  e.ULONG;
  2621.  
  2622.     (* Non-zero if the screen or something about the screen
  2623.      * changed since the last time you were invoked:
  2624.      *)
  2625.     screenChanged * :  LONGINT;
  2626.   END;
  2627.  
  2628. (*
  2629. **  $VER: sghooks.h 38.1 (11.11.91)
  2630. **
  2631. **  string gadget extensions and hooks
  2632. *)
  2633.  
  2634.  
  2635. TYPE
  2636.  
  2637.   StringExtend * = RECORD
  2638.     (* display specifications   *)
  2639.     font *         : gfx.TextFontPtr;      (* must be an open Font (not TextAttr)  *)
  2640.     pens *         : ARRAY 2 OF e.UBYTE; (* color of text/backgroun              *)
  2641.     activePens *   : ARRAY 2 OF e.UBYTE; (* colors when gadget is active         *)
  2642.  
  2643.     (* edit specifications      *)
  2644.     initialModes * : s.SET32;            (* initial mode flags, below            *)
  2645.     editHook *     : u.HookPtr;          (* if non-NULL, must supply WorkBuffer  *)
  2646.     workBuffer *   : e.APTR;             (* must be as large as StringInfo.Buffer*)
  2647.  
  2648.     reserved *     : ARRAY 4 OF e.ULONG; (* set to 0                             *)
  2649.   END; (* StringExtend *)
  2650.  
  2651.   SGWork * = RECORD
  2652.     (* set up when gadget is first activated    *)
  2653.     gadget *       : GadgetPtr;        (* the contestant itself        *)
  2654.     stringInfo *   : StringInfoPtr;    (* easy access to sinfo         *)
  2655.     workBuffer *   : e.APTR;           (* intuition's planned result   *)
  2656.     prevBuffer *   : e.APTR;           (* what was there before        *)
  2657.     modes *        : s.SET32;          (* current mode                 *)
  2658.  
  2659.     (* modified for each input event    *)
  2660.     iEvent *       : ie.InputEventDummyPtr; (* actual event: do not change  *)
  2661.     code *         : e.UWORD;          (* character code, if one byte  *)
  2662.     bufferPos *    : INTEGER;          (* cursor position              *)
  2663.     numChars *     : INTEGER;
  2664.     actions *      : s.SET32;          (* what Intuition will do       *)
  2665.     longInt *      : LONGINT;          (* temp storage for longint     *)
  2666.  
  2667.     gadgetInfo *   : GadgetInfoPtr;    (* see cghooks.h                *)
  2668.     editOp *       : e.UWORD;          (* from constants below         *)
  2669.   END; (* SGWork *)
  2670.  
  2671. CONST
  2672.  
  2673. (* SGWork.EditOp -
  2674.  * These values indicate what basic type of operation the global
  2675.  * editing hook has performed on the string before your gadget's custom
  2676.  * editing hook gets called.  You do not have to be concerned with the
  2677.  * value your custom hook leaves in the EditOp field, only if you
  2678.  * write a global editing hook.
  2679.  *
  2680.  * For most of these general edit operations, you'll want to compare
  2681.  * the BufferPos and NumChars of the StringInfo (before global editing)
  2682.  * and SGWork (after global editing).
  2683.  *)
  2684.  
  2685.   eoNoOp *         = 0001H;
  2686.     (* did nothing                                                  *)
  2687.   eoDelBackward *  = 0002H;
  2688.     (* deleted some chars (maybe 0).                                *)
  2689.   eoDelForward *   = 0003H;
  2690.     (* deleted some characters under and in front of the cursor     *)
  2691.   eoMoveCursor *   = 0004H;
  2692.     (* moved the cursor                                             *)
  2693.   eoEnter *        = 0005H;
  2694.     (* "enter" or "return" key, terminate                           *)
  2695.   eoReset *        = 0006H;
  2696.     (* current Intuition-style undo                                 *)
  2697.   eoReplaceChar *  = 0007H;
  2698.     (* replaced one character and (maybe) advanced cursor           *)
  2699.   eoInsertChar *   = 0008H;
  2700.     (* inserted one char into string or added one at end            *)
  2701.   eoBadFormat *    = 0009H;
  2702.     (* didn't like the text data, e.g., Bad LONGINT                 *)
  2703.   eoBigChange *    = 000AH; (* unused by Intuition  *)
  2704.     (* complete or major change to the text, e.g. new string        *)
  2705.   eoUndo *         = 000BH; (* unused by Intuition  *)
  2706.     (* some other style of undo                                     *)
  2707.   eoClear *        = 000CH;
  2708.     (* clear the string                                             *)
  2709.   eoSpecial *      = 000DH; (* unused by Intuition  *)
  2710.     (* some operation that doesn't fit into the categories here     *)
  2711.  
  2712.  
  2713. (* Mode Flags definitions (ONLY first group allowed as InitialModes)    *)
  2714.   sgmReplace *     = 0;       (* replace mode                 *)
  2715. (* please initialize StringInfo with in-range value of BufferPos
  2716.  * if you are using sgmREPLACE mode.
  2717.  *)
  2718.  
  2719.   sgmFixedField *  = 1;       (* fixed length buffer          *)
  2720.                                         (* always set sgmREPLACE, too  *)
  2721.   sgmNoFilter *    = 2;       (* don't filter control chars   *)
  2722.  
  2723. (* sgmExitHelp is new for V37, and ignored by V36: *)
  2724.   sgmExitHelp *    = 7;       (* exit with code * = 5FH if HELP hit *)
  2725.  
  2726.  
  2727. (* These Mode Flags are for internal use only                           *)
  2728.   sgmNoChange *    = 3;       (* no edit changes yet          *)
  2729.   sgmNoWorkB *     = 4;       (* Buffer == PrevBuffer         *)
  2730.   sgmControl *     = 5;       (* control char escape mode     *)
  2731.   sgmLongint *     = 6;       (* an intuition longint gadget  *)
  2732.  
  2733. (* String Gadget Action Flags (put in SGWork.Actions by EditHook)       *)
  2734.   sgaUse *         = 0;  (* use contents of SGWork               *)
  2735.   sgaEnd *         = 1;  (* terminate gadget, code in Code field *)
  2736.   sgaBeep *        = 2;  (* flash the screen for the user        *)
  2737.   sgaReuse *       = 3;  (* reuse input event                    *)
  2738.   sgaRedisplay *   = 4; (* gadget visuals changed               *)
  2739.  
  2740. (* New for V37: *)
  2741.   sgaNextActive *  = 5; (* Make next possible gadget active.    *)
  2742.   sgaPrevActive *  = 6; (* Make previous possible gadget active.*)
  2743.  
  2744. (* function id for only existing custom string gadget edit hook *)
  2745.  
  2746.   sghKey *         = 1;    (* process editing keystroke            *)
  2747.   sghClick *       = 2;    (* process mouse click cursor position  *)
  2748.  
  2749. (* Here's a brief summary of how the custom string gadget edit hook works:
  2750.  *      You provide a hook in StringInfo.Extension.EditHook.
  2751.  *      The hook is called in the standard way with the 'object'
  2752.  *      a pointer to SGWork, and the 'message' a pointer to a command
  2753.  *      block, starting either with (longword) sghKey, sghClick,
  2754.  *      or something new.
  2755.  *
  2756.  *      You return 0 if you don't understand the command (sghKey is
  2757.  *      required and assumed).  Return non-zero if you implement the
  2758.  *      command.
  2759.  *
  2760.  *   sghKEY:
  2761.  *      There are no parameters following the command longword.
  2762.  *
  2763.  *      Intuition will put its idea of proper values in the SGWork
  2764.  *      before calling you, and if you leave sgaUse set in the
  2765.  *      SGWork.Actions field, Intuition will use the values
  2766.  *      found in SGWork fields WorkBuffer, NumChars, BufferPos,
  2767.  *      and LongInt, copying the WorkBuffer back to the StringInfo
  2768.  *      Buffer.
  2769.  *
  2770.  *      NOTE WELL: You may NOT change other SGWork fields.
  2771.  *
  2772.  *      If you clear sgaUSE, the string gadget will be unchanged.
  2773.  *
  2774.  *      If you set sgaEND, Intuition will terminate the activation
  2775.  *      of the string gadget.  If you also set sgaREUSE, Intuition
  2776.  *      will reuse the input event after it deactivates your gadget.
  2777.  *
  2778.  *      In this case, Intuition will put the value found in SGWork.Code
  2779.  *      into the IntuiMessage.Code field of the idcmpGADGETUP message it
  2780.  *      sends to the application.
  2781.  *
  2782.  *      If you set sgaBEEP, Intuition will call DisplayBeep(); use
  2783.  *      this if the user has typed in error, or buffer is full.
  2784.  *
  2785.  *      Set sgaREDISPLAY if the changes to the gadget warrant a
  2786.  *      gadget redisplay.  Note: cursor movement requires a redisplay.
  2787.  *
  2788.  *      Starting in V37, you may set sgaPREVACTIVE or sgaNEXTACTIVE
  2789.  *      when you set sgaEND.  This tells Intuition that you want
  2790.  *      the next or previous gadget with gflgTABCYCLE to be activated.
  2791.  *
  2792.  *   sghCLICK:
  2793.  *      This hook command is called when Intuition wants to position
  2794.  *      the cursor in response to a mouse click in the string gadget.
  2795.  *
  2796.  *      Again, here are no parameters following the command longword.
  2797.  *
  2798.  *      This time, Intuition has already calculated the mouse position
  2799.  *      character cell and put it in SGWork.BufferPos.  The previous
  2800.  *      BufferPos value remains in the SGWork.StringInfo.BufferPos.
  2801.  *
  2802.  *      Intuition will again use the SGWork fields listed above for
  2803.  *      sghKEY.  One restriction is that you are NOT allowed to set
  2804.  *      sgaEND or sgaREUSE for this command.  Intuition will not
  2805.  *      stand for a gadget which goes inactive when you click in it.
  2806.  *
  2807.  *      You should always leave the sgaREDISPLAY flag set, since Intuition
  2808.  *      uses this processing when activating a string gadget.
  2809.  *)
  2810.  
  2811. (*
  2812. **  $VER: cghooks.h 38.1 (11.11.91)
  2813. **
  2814. **  Custom Gadget processing
  2815. *)
  2816.  
  2817.  
  2818. TYPE
  2819.  
  2820. (*
  2821.  * Package of information passed to custom and 'boopsi'
  2822.  * gadget "hook" functions.  This structure is READ ONLY.
  2823.  *)
  2824.  
  2825.   GadgetInfo * = RECORD
  2826.  
  2827.     screen -       : ScreenPtr;
  2828.     window -       : WindowPtr;        (* null for screen gadgets *)
  2829.     requester -    : RequesterPtr;     (* null if not gtypREQGADGET *)
  2830.  
  2831.     (* rendering information:
  2832.      * don't use these without cloning/locking.
  2833.      * Official way is to call ObtainRPort()
  2834.      *)
  2835.     rastPort -     : gfx.RastPortPtr;
  2836.     layer -        : gfx.LayerPtr;
  2837.  
  2838.     (* copy of dimensions of screen/window/g00/req(/group)
  2839.      * that gadget resides in.  Left/Top of this box is
  2840.      * offset from window mouse coordinates to gadget coordinates
  2841.      *          screen gadgets:        0,0 (from screen coords)
  2842.      * window gadgets (no g00):        0,0
  2843.      * gtypGZZGADGETs (borderlayer):   0,0
  2844.      * GZZ innerlayer gadget:          borderleft, bordertop
  2845.      * Requester gadgets:              reqleft, reqtop
  2846.      *)
  2847.     domain -       : IBox;
  2848.  
  2849.     (* these are the pens for the window or screen      *)
  2850.     pens - : RECORD
  2851.       detailPen -  : e.UBYTE;
  2852.       blockPen -   : e.UBYTE;
  2853.     END;
  2854.  
  2855.     (* the Detail and Block pens in giDrInfo->driPens[] are
  2856.      * for the screen.  Use the above for window-sensitive
  2857.      * colors.
  2858.      *)
  2859.     drInfo -       : DrawInfoPtr;
  2860.  
  2861.     (* reserved space: this structure is extensible
  2862.      * anyway, but using these saves some recompilation
  2863.      *)
  2864.     reserved -     : ARRAY 6 OF e.ULONG;
  2865.   END; (* GadgetInfo *)
  2866.  
  2867. (*** system private data structure for now ***)
  2868. (* prop gadget extra info       *)
  2869.  
  2870.   PGX = RECORD
  2871.     container * : IBox;
  2872.     newKnob *   : IBox;
  2873.   END; (* PGX *)
  2874.  
  2875. (*
  2876. **  $VER: classusr.h 38.2 (14.4.92)
  2877. **
  2878. **  For application users of Intuition object classes
  2879. *)
  2880.  
  2881. TYPE
  2882.  
  2883. (*** User visible handles on objects, classes, messages ***)
  2884.   ObjectUsr * = e.ULONG;          (* abstract handle *)
  2885.  
  2886.   ClassID * = e.LSTRPTR;
  2887.  
  2888. (* you can use this type to point to a "generic" message,
  2889.  * in the object-oriented programming parlance.  Based on
  2890.  * the value of 'MethodID', you dispatch to processing
  2891.  * for the various message types.  The meaningful parameter
  2892.  * packet structure definitions are defined below.
  2893.  *)
  2894.  
  2895.   MsgBase *= RECORD END;
  2896.   MsgBasePtr *= POINTER TO MsgBase;
  2897.  
  2898.   Msg * = RECORD (MsgBase)
  2899.     methodID * : e.ULONG
  2900.     (* method-specific data follows, some examples below *)
  2901.   END; (* Msg *)
  2902.  
  2903. CONST
  2904.  
  2905. (*
  2906.  * Class id strings for Intuition classes.
  2907.  * There's no real reason to use the uppercase constants
  2908.  * over the lowercase strings, but this makes a good place
  2909.  * to list the names of the built-in classes.
  2910.  *)
  2911.   rootClass *       = "rootclass";     (* classusr.h   *)
  2912.   imageClass *      = "imageclass";    (* imageclass.h *)
  2913.   frameIClass *     = "frameiclass";
  2914.   sysIClass *       = "sysiclass";
  2915.   fillRectClass *   = "fillrectclass";
  2916.   gadgetClass *     = "gadgetclass";   (* gadgetclass.h *)
  2917.   propGClass *      = "propgclass";
  2918.   strGClass *       = "strgclass";
  2919.   buttonGClass *    = "buttongclass";
  2920.   frButtonClass *   = "frbuttonclass";
  2921.   groupGClass *     = "groupgclass";
  2922.   icClass *         = "icclass";       (* icclass.h    *)
  2923.   modelClass *      = "modelclass";
  2924.   iTextIClass *     = "itexticlass";
  2925.   pointerClass *    = "pointerclass";  (* pointerclass.h *)
  2926.  
  2927. (* Dispatched method ID's
  2928.  * NOTE: Applications should use Intuition entry points, not direct
  2929.  * DoMethod() calls, for NewObject, DisposeObject, SetAttrs,
  2930.  * SetGadgetAttrs, and GetAttr.
  2931.  *)
  2932.  
  2933.   omDummy *        = 100H;
  2934.   omNew *          = 101H; (* 'object' parameter is "true class"   *)
  2935.   omDispose *      = 102H; (* delete self (no parameters)          *)
  2936.   omSet *          = 103H; (* set attributes (in tag list)         *)
  2937.   omGet *          = 104H; (* return single attribute value        *)
  2938.   omAddTail *      = 105H; (* add self to a List (let root do it)  *)
  2939.   omRemove *       = 106H; (* remove self from list                *)
  2940.   omNotify *       = 107H; (* send to self: notify dependents      *)
  2941.   omUpdate *       = 108H; (* notification message from somebody   *)
  2942.   omAddMember *    = 109H; (* used by various classes with lists   *)
  2943.   omRemMember *    = 10AH; (* used by various classes with lists   *)
  2944.  
  2945. (* Parameter "Messages" passed to methods       *)
  2946.  
  2947. (* omNew and omSet    *)
  2948.  
  2949. TYPE
  2950.  
  2951.   OpSet * = RECORD (MsgBase)
  2952.     msg *      : Msg;
  2953.     attrList * : u.TagListPtr;  (* new attributes       *)
  2954.     gInfo *    : GadgetInfoPtr; (* always there for gadgets,
  2955.                                  * when SetGadgetAttrs() is used,
  2956.                                  * but will be NULL for omNEW
  2957.                                  *)
  2958.   END; (* OpSet *)
  2959.  
  2960. (* omNOTIFY, and omUPDATE     *)
  2961.  
  2962.   OpUpdate * = RECORD (MsgBase)
  2963.     msg *      : Msg;
  2964.     attrList * : u.TagListPtr;  (* new attributes       *)
  2965.     gInfo *    : GadgetInfoPtr; (* non-NULL when SetGadgetAttrs or
  2966.                                  * notification resulting from gadget
  2967.                                  * input occurs.
  2968.                                  *)
  2969.     flags *    : s.SET32;       (* defined below        *)
  2970.   END; (* OpUpdate *)
  2971.  
  2972. CONST
  2973.  
  2974. (* this flag means that the update message is being issued from
  2975.  * something like an active gadget, a la gactFollowMouse.  When
  2976.  * the gadget goes inactive, it will issue a final update
  2977.  * message with this bit cleared.  Examples of use are for
  2978.  * gactFollowMouse equivalents for propgadclass, and repeat strobes
  2979.  * for buttons.
  2980.  *)
  2981.   opuInterim *    = 0;
  2982.  
  2983. (* omGet       *)
  2984.  
  2985. TYPE
  2986.  
  2987.   OpGet * = RECORD (MsgBase)
  2988.     msg *     : Msg;
  2989.     attrID *  : e.ULONG;
  2990.     storage * : SYS.ADDRESS; (* may be other types, but "int"
  2991.                               * types are all e.ULONG
  2992.                               *)
  2993.   END; (* OpGet *)
  2994.  
  2995. (* omAddTail   *)
  2996.  
  2997.   OpAddTail * = RECORD (MsgBase)
  2998.     msg *  : Msg;
  2999.     list * : e.ListPtr;
  3000.   END; (* OpAddTail *)
  3001.  
  3002. (* omAddMember, omRemMember   *)
  3003.  
  3004.   OpMember * = RECORD (MsgBase)
  3005.     msg *  : Msg;
  3006.     object : ObjectPtr;
  3007.   END; (* OpMember *)
  3008.  
  3009. (*
  3010. **  $VER: classes.h 38.1 (11.11.91)
  3011. **
  3012. **  Used only by class implementors
  3013. *)
  3014.  
  3015.  
  3016. TYPE
  3017.  
  3018. (*******************************************)
  3019. (*** "White box" access to struct IClass ***)
  3020. (*******************************************)
  3021.  
  3022. (* This structure is READ-ONLY, and allocated only by Intuition *)
  3023.  
  3024.   IClass * = RECORD (u.HookBase)
  3025.     dispatcher -   : u.Hook;
  3026.     reserved -     : e.ULONG;    (* must be 0  *)
  3027.     super -        : IClassPtr;
  3028.     id -           : ClassID;
  3029.  
  3030.     (* where within an object is the instance data for this class? *)
  3031.     instOffset -   : e.UWORD;
  3032.     instSize -     : e.UWORD;
  3033.  
  3034.     userData -     : e.ULONG;    (* per-class data of your choice *)
  3035.     subclassCount - : e.ULONG;   (* how many direct subclasses?  *)
  3036.     objectCount -  : e.ULONG;    (* how many objects created of this class? *)
  3037.     flags -        : s.SET32;
  3038.   END; (* IClass *)
  3039.  
  3040.   Class * = IClass;
  3041.  
  3042. CONST
  3043.  
  3044.   clInList *      = 0;      (* class is in public class list *)
  3045.  
  3046. TYPE
  3047.  
  3048. (**************************************************)
  3049. (*** "White box" access to struct Object       ***)
  3050. (**************************************************)
  3051.  
  3052. (*
  3053.  * We have this, the instance data of the root class, PRECEDING
  3054.  * the "object".  This is so that Gadget objects are Gadget pointers,
  3055.  * and so on.  If this structure grows, it will always have oClass
  3056.  * at the end, so the macro OCLASS(o) will always have the same
  3057.  * offset back from the pointer returned from NewObject().
  3058.  *
  3059.  * This data structure is subject to change.  Do not use the oNode
  3060.  * embedded structure.
  3061.  *)
  3062.  
  3063.   Object * = RECORD (e.MinNodeBase)
  3064.     node *  : e.MinNode;
  3065.     class * : IClassPtr;
  3066.   END; (* Object *)
  3067.  
  3068. (*
  3069. **  $VER: gadgetclass.h 38.10 (8.1.93)
  3070. **
  3071. **  Custom and 'boopsi' gadget class interface
  3072. *)
  3073.  
  3074.  
  3075. CONST
  3076.  
  3077. (* Gadget Class attributes      *)
  3078.  
  3079.   gaDummy *             = u.user  + 30000H;
  3080.   gaLeft *              = gaDummy + 0001H;
  3081.   gaRelRight *          = gaDummy + 0002H;
  3082.   gaTop *               = gaDummy + 0003H;
  3083.   gaRelBottom *         = gaDummy + 0004H;
  3084.   gaWidth *             = gaDummy + 0005H;
  3085.   gaRelWidth *          = gaDummy + 0006H;
  3086.   gaHeight *            = gaDummy + 0007H;
  3087.   gaRelHeight *         = gaDummy + 0008H;
  3088.   gaText *              = gaDummy + 0009H; (* tiData is (e.UBYTE *  *)
  3089.   gaImage *             = gaDummy + 000AH;
  3090.   gaBorder *            = gaDummy + 000BH;
  3091.   gaSelectRender *      = gaDummy + 000CH;
  3092.   gaHighlight *         = gaDummy + 000DH;
  3093.   gaDisabled *          = gaDummy + 000EH;
  3094.   gaGZZGadget *         = gaDummy + 000FH;
  3095.   gaID *                = gaDummy + 0010H;
  3096.   gaUserData *          = gaDummy + 0011H;
  3097.   gaSpecialInfo *       = gaDummy + 0012H;
  3098.   gaSelected *          = gaDummy + 0013H;
  3099.   gaEndGadget *         = gaDummy + 0014H;
  3100.   gaImmediate *         = gaDummy + 0015H;
  3101.   gaRelVerify *         = gaDummy + 0016H;
  3102.   gaFollowMouse *       = gaDummy + 0017H;
  3103.   gaRightBorder *       = gaDummy + 0018H;
  3104.   gaLeftBorder *        = gaDummy + 0019H;
  3105.   gaTopBorder *         = gaDummy + 001AH;
  3106.   gaBottomBorder *      = gaDummy + 001BH;
  3107.   gaToggleSelect *      = gaDummy + 001CH;
  3108.  
  3109.     (* internal use only, until further notice, please *)
  3110.   gaSysGadget *         = gaDummy + 001DH;
  3111.         (* bool, sets gtypSysGadget field in type      *)
  3112.   gaSysGType *          = gaDummy + 001EH;
  3113.         (* e.g., gtypWUpFront, ...     *)
  3114.  
  3115.   gaPrevious *          = gaDummy + 001FH;
  3116.         (* previous gadget (or (struct Gadget ** )) in linked list
  3117.          * NOTE: This attribute CANNOT be used to link new gadgets
  3118.          * into the gadget list of an open window or requester.
  3119.          * You must use AddGList().
  3120.          *)
  3121.  
  3122.   gaNext *              = gaDummy + 0020H;
  3123.          (* not implemented *)
  3124.  
  3125.   gaDrawInfo *          = gaDummy + 0021H;
  3126.         (* some fancy gadgets need to see a DrawInfo
  3127.          * when created or for layout
  3128.          *)
  3129.  
  3130. (* You should use at most ONE of gaText, gaIntuiText, and gaLabelImage *)
  3131.   gaIntuiText *            = gaDummy + 0022H;
  3132.         (* tiData is (struct IntuiText * ) *)
  3133.  
  3134.   gaLabelImage *           = gaDummy + 0023H;
  3135.         (* tiData is an image (object), used in place of
  3136.          * GadgetText
  3137.          *)
  3138.  
  3139.   gaTabCycle *             = gaDummy + 0024H;
  3140.         (* New for V37:
  3141.          * Boolean indicates that this gadget is to participate in
  3142.          * cycling activation with Tab or Shift-Tab.
  3143.          *)
  3144.  
  3145.   gaGadgetHelp * = gaDummy + 0025H;
  3146.         (* New for V39:
  3147.          * Boolean indicates that this gadget sends gadget-help
  3148.          *)
  3149.  
  3150.   gaBounds * = gaDummy + 0026H;
  3151.         (* New for V39:
  3152.          * ti_Data is a pointer to an IBox structure which is
  3153.          * to be copied into the extended gadget's bounds.
  3154.          *)
  3155.  
  3156.   gaRelSpecial * = gaDummy + 0027H;
  3157.         (* New for V39:
  3158.          * Boolean indicates that this gadget has the "special relativity"
  3159.          * property, which is useful for certain fancy relativity
  3160.          * operations through the gmLayout method.
  3161.          *)
  3162.  
  3163. (* PROPGCLASS attributes *)
  3164.  
  3165.   pgaDummy *       = u.user   + 31000H;
  3166.   pgaFreedom *     = pgaDummy + 0001H;
  3167.         (* only one of FREEVERT or FREEHORIZ *)
  3168.   pgaBorderless *  = pgaDummy + 0002H;
  3169.   pgaHorizPot *    = pgaDummy + 0003H;
  3170.   pgaHorizBody *   = pgaDummy + 0004H;
  3171.   pgaVertPot *     = pgaDummy + 0005H;
  3172.   pgaVertBody *    = pgaDummy + 0006H;
  3173.   pgaTotal *       = pgaDummy + 0007H;
  3174.   pgaVisible *     = pgaDummy + 0008H;
  3175.   pgaTop *         = pgaDummy + 0009H;
  3176. (* New for V37: *)
  3177.   pgaNewLook *     = pgaDummy + 000AH;
  3178.  
  3179. (* STRGCLASS attributes *)
  3180.  
  3181.   stringaDummy *           = u.user       + 32000H;
  3182.   stringaMaxChars *        = stringaDummy + 0001H;
  3183. (* Note:  There is a minor problem with Intuition when using boopsi integer
  3184.  * gadgets (which are requested by using stringaLongInt).  Such gadgets
  3185.  * must not have a stringaMaxChars to be bigger than 15.  Setting
  3186.  * stringaMaxChars for a boopsi integer gadget will cause a mismatched
  3187.  * FreeMem() to occur.
  3188.  *)
  3189.  
  3190.   stringaBuffer *          = stringaDummy + 0002H;
  3191.   stringaUndoBuffer *      = stringaDummy + 0003H;
  3192.   stringaWorkBuffer *      = stringaDummy + 0004H;
  3193.   stringaBufferPos *       = stringaDummy + 0005H;
  3194.   stringaDispPos *         = stringaDummy + 0006H;
  3195.   stringaAltKeyMap *       = stringaDummy + 0007H;
  3196.   stringaFont *            = stringaDummy + 0008H;
  3197.   stringaPens *            = stringaDummy + 0009H;
  3198.   stringaActivePens *      = stringaDummy + 000AH;
  3199.   stringaEditHook *        = stringaDummy + 400BH;
  3200.   stringaEditModes *       = stringaDummy + 000CH;
  3201.  
  3202. (* booleans *)
  3203.   stringaReplaceMode *     = stringaDummy + 000DH;
  3204.   stringaFixedFieldMode *  = stringaDummy + 000EH;
  3205.   stringaNoFilterMode *    = stringaDummy + 000FH;
  3206.  
  3207.   stringaJustification *   = stringaDummy + 0010H;
  3208.         (* gactSTRINGCENTER, gactSTRINGLEFT, gactSTRINGRIGHT *)
  3209.   stringaLongVal *         = stringaDummy + 0011H;
  3210.   stringaTextVal *         = stringaDummy + 0012H;
  3211.  
  3212.   stringaExitHelp *        = stringaDummy + 0013H;
  3213.         (* stringaExitHelp is new for V37, and ignored by V36.
  3214.          * Set this if you want the gadget to exit when Help is
  3215.          * pressed.  Look for a code of 5FH, the rawkey code for Help
  3216.          *)
  3217.  
  3218.   sgDefaultMaxChars *      = 128;
  3219.  
  3220. (* Gadget Layout related attributes     *)
  3221.  
  3222.   layoutaDummy *           = u.user + 38000H;
  3223.   layoutaLayoutObj *       = layoutaDummy + 0001H;
  3224.   layoutaSpacing *         = layoutaDummy + 0002H;
  3225.   layoutaOrientation *     = layoutaDummy + 0003H;
  3226.  
  3227. (* orientation values   *)
  3228.   lOrientNone *    = 0;
  3229.   lOrientHoriz *   = 1;
  3230.   lOrientVert *    = 2;
  3231.  
  3232.  
  3233. (* Gadget Method ID's   *)
  3234.  
  3235.   gmDummy *        = -1;    (* not used for anything                *)
  3236.   gmHitTest *      = 0;     (* return gmrGADGETHIT if you are clicked on
  3237.                              * (whether or not you are disabled).
  3238.                              *)
  3239.   gmRender *       = 1;     (* draw yourself, in the appropriate state *)
  3240.   gmGoActive *     = 2;     (* you are now going to be fed input    *)
  3241.   gmHandleInput *  = 3;     (* handle that input                    *)
  3242.   gmGoInactive *   = 4;     (* whether or not by choice, you are done  *)
  3243.   gmHelpTest *     = 5;     (* Will you send gadget help if the mouse is
  3244.                              * at the specified coordinates?  See below
  3245.                              * for possible GMR_ values.
  3246.                              *)
  3247.   gmLayout *       = 6;     (* re-evaluate your size based on the GadgetInfo
  3248.                              * Domain.  Do NOT re-render yourself yet, you
  3249.                              * will be called when it is time...
  3250.                              *)
  3251.  
  3252. (* Parameter "Messages" passed to gadget class methods  *)
  3253.  
  3254. TYPE
  3255.  
  3256. (* gmHitTest and gmHelpTest send this message.
  3257.  * For gmHitTest, mouse are coordinates relative to the gadget
  3258.  * select box.  For gmHelpTest, the coordinates are relative to
  3259.  * the gadget bounding box (which defaults to the select box).
  3260.  *)
  3261.  
  3262.   HitTest * = RECORD (MsgBase)
  3263.     msg *   : Msg;
  3264.     gInfo * : GadgetInfoPtr;
  3265.     mouse * : gfx.Point;
  3266.   END; (* HitTest *)
  3267. (* For gmHitTest, return gmrGadgetHit if you were indeed hit,
  3268.  * otherwise return zero.
  3269.  *
  3270.  * For gmHelpTest, return gmrNoHelpHit (zero) if you were not hit.
  3271.  * Typically, return gmrHelpHit if you were hit.
  3272.  * It is possible to pass a UWORD to the application via the Code field
  3273.  * of the idcmpGadgetHelp message.  Return gmrHelpCode or'd with
  3274.  * the UWORD-sized result you wish to return.
  3275.  *
  3276.  * gmrHelpHit yields a Code value of -1, which should
  3277.  * mean "nothing particular" to the application.
  3278.  *)
  3279.  
  3280. CONST
  3281.  
  3282.   gmrGadgetHit * = 000000004H;  (* gmHitTest hit *)
  3283.  
  3284.   gmrNoHelpHit * = 000000000H;  (* gmHelpTest didn't hit *)
  3285.   gmrHelpHit *   = 0FFFFFFFFH;  (* gmHelpTest hit, return code = ~0 *)
  3286.   gmrHelpCode *  = 000010000H;  (* gmHelpTest hit, return low word as code *)
  3287.  
  3288. TYPE
  3289.  
  3290. (* gmRender    *)
  3291.  
  3292.   Render * = RECORD (MsgBase)
  3293.     msg *    : Msg;
  3294.     gInfo *  : GadgetInfoPtr;  (* gadget context               *)
  3295.     rPort *  : gfx.RastPortPtr;  (* all ready for use            *)
  3296.     redraw * : LONGINT;        (* might be a "highlight pass"  *)
  3297.   END; (* Render *)
  3298.  
  3299. CONST
  3300.  
  3301. (* values of gprRedraw *)
  3302.   gRedrawUpdate *  = 2;     (* incremental update, e.g. prop slider *)
  3303.   gRedrawRedraw *  = 1;     (* redraw gadget        *)
  3304.   gRedrawToggle *  = 0;     (* toggle highlight, if applicable      *)
  3305.  
  3306. (* gmGoActive, gmHandleInput  *)
  3307.  
  3308. TYPE
  3309.  
  3310.   Input * = RECORD (MsgBase)
  3311.     msg *         : Msg;
  3312.     gInfo *       : GadgetInfoPtr;
  3313.     iEvent *      : ie.InputEventDummyPtr;
  3314.     termination * : e.APTR;
  3315.     mouse *       : gfx.Point;
  3316.  
  3317.     (* (V39) Pointer to TabletData structure, if this event originated
  3318.      * from a tablet which sends ie.subClassNewTablet events, or NULL if
  3319.      * not.
  3320.      *
  3321.      * DO NOT ATTEMPT TO READ THIS FIELD UNDER INTUITION PRIOR TO V39!
  3322.      * IT WILL BE INVALID!
  3323.      *)
  3324.     tabletData *  :  TabletDataPtr;
  3325.   END; (* Input *)
  3326.  
  3327. CONST
  3328.  
  3329. (* gmHandleInput and gmGoActive  return code flags    *)
  3330. (* return gmrMeActive (0) alone if you want more input.
  3331.  * Otherwise, return ONE of gmrNoReuse and gmrReuse, and optionally
  3332.  * gmrVerify.
  3333.  *)
  3334.   gmrMeActive *    = 0;
  3335.   gmrNoReuse *     = 2;
  3336.   gmrReuse *       = 4;
  3337.   gmrVerify *      = 8;        (* you MUST set cgpTermination *)
  3338.  
  3339. (* New for V37:
  3340.  * You can end activation with one of gmrNEXTACTIVE and gmrPREVACTIVE,
  3341.  * which instructs Intuition to activate the next or previous gadget
  3342.  * that has gflgTABCYCLE set.
  3343.  *)
  3344.   gmrNextActive *  = 16;
  3345.   gmrPrevActive *  = 32;
  3346.  
  3347. (* gmGoInactive *)
  3348.  
  3349. TYPE
  3350.  
  3351.   GoInactive * = RECORD (MsgBase)
  3352.     msg *   : Msg;
  3353.     gInfo * : GadgetInfoPtr;
  3354.     (* V37 field only!  DO NOT attempt to read under V36! *)
  3355.     abort * : e.ULONG;     (* abort=1 if gadget was aborted
  3356.                             * by Intuition and 0 if gadget went
  3357.                             * inactive at its own request
  3358.                             *)
  3359.   END; (* GoInactive *)
  3360.  
  3361. (* New for V39: Intuition sends gmLayout to any grel* gadget when
  3362.  * the gadget is added to the window (or when the window opens, if
  3363.  * the gadget was part of the NewWindow.FirstGadget or the WA_Gadgets
  3364.  * list), or when the window is resized.  Your gadget can set the
  3365.  * GA_RelSpecial property to get gmLayout events without Intuition
  3366.  * changing the interpretation of your gadget select box.  This
  3367.  * allows for completely arbitrary resizing/repositioning based on
  3368.  * window size.
  3369.  *)
  3370.  
  3371. (* GM_LAYOUT *)
  3372.   Layout * = RECORD (MsgBase)
  3373.     msg *     : Msg;
  3374.     gInfo *   : GadgetInfoPtr;
  3375.     initial * : e.ULONG;       (* non-zero if this method was invoked
  3376.                                 * during AddGList() or OpenWindow()
  3377.                                 * time.  zero if this method was invoked
  3378.                                 * during window resizing.
  3379.                                 *)
  3380.   END;
  3381.  
  3382. (*
  3383. **  $VER: icclass.h 38.1 (11.11.91)
  3384. **
  3385. **  Gadget/object interconnection classes
  3386. *)
  3387.  
  3388.  
  3389. CONST
  3390.  
  3391.   icmDummy *       = 0401H;       (* used for nothing             *)
  3392.   icmSetLoop *     = 0402H;       (* set/increment loop counter   *)
  3393.   icmClearLoop *   = 0403H;       (* clear/decrement loop counter *)
  3394.   icmCheckLoop *   = 0404H;       (* set/increment loop           *)
  3395.  
  3396. (* no parameters for icmSetLoop, icmClearLoop, icmCheckLoop  *)
  3397.  
  3398. (* interconnection attributes used by icclass, modelclass, and gadgetclass *)
  3399.   icaDummy *       = u.user + 40000H;
  3400.   icaTarget *      = icaDummy + 1;
  3401.         (* interconnection target               *)
  3402.   icaMap *         = icaDummy + 2;
  3403.         (* interconnection map tagitem list     *)
  3404.   icSpecialCode *  = icaDummy + 3;
  3405.         (* a "pseudo-attribute", see below.     *)
  3406.  
  3407. (* Normally, the value for icaTarget is some object pointer,
  3408.  * but if you specify the special value icTargetIDCMP, notification
  3409.  * will be send as an idcmpIDCMPUpdate message to the appropriate window's
  3410.  * IDCMP port.  See the definition of idcmpIDCMPUpdate.
  3411.  *
  3412.  * When you specify icTargetIDCMP for icaTarget, the map you
  3413.  * specify will be applied to derive the attribute list that is
  3414.  * sent with the idcmpIDCMPUpdate message.  If you specify a map list
  3415.  * which results in the attribute tag id icSpecialCode, the
  3416.  * lower sixteen bits of the corresponding tiData value will
  3417.  * be copied into the Code field of the idcmpIDCMPUpdate IntuiMessage.
  3418.  *)
  3419.   icTargetIDCMP *  = {0..31};
  3420.  
  3421. (*
  3422. **  $VER: imageclass.h 38.5 (26.3.92)
  3423. **
  3424. **  Definitions for the image classes
  3425. *)
  3426.  
  3427.  
  3428. CONST
  3429.  
  3430.   customImageDepth *        = -1;
  3431. (* if image.Depth is this, it's a new Image class object *)
  3432.  
  3433. (******************************************************)
  3434.   iaDummy *                = u.user + 20000H;
  3435.   iaLeft *                 = iaDummy + 01H;
  3436.   iaTop *                  = iaDummy + 02H;
  3437.   iaWidth *                = iaDummy + 03H;
  3438.   iaHeight *               = iaDummy + 04H;
  3439.   iaFGPen *                = iaDummy + 05H;
  3440.                     (* iaFGPen also means "PlanePick"  *)
  3441.   iaBGPen *                = iaDummy + 06H;
  3442.                     (* iaBGPen also means "PlaneOnOff" *)
  3443.   iaData *                 = iaDummy + 07H;
  3444.                     (* bitplanes, for classic image,
  3445.                      * other image classes may use it for other things
  3446.                      *)
  3447.   iaLineWidth *            = iaDummy + 08H;
  3448.   iaPens *                 = iaDummy + 0EH;
  3449.                     (* pointer to e.UWORD pens[],
  3450.                      * ala DrawInfo.Pens, MUST be
  3451.                      * terminated by ~0.  Some classes can
  3452.                      * choose to have this, or sysiaDrawInfo,
  3453.                      * or both.
  3454.                      *)
  3455.   iaResolution *           = iaDummy + 0FH;
  3456.                     (* packed uwords for x/y resolution into a longword
  3457.                      * ala DrawInfo.Resolution
  3458.                      *)
  3459.  
  3460. (**** see class documentation to learn which    *****)
  3461. (**** classes recognize these                   *****)
  3462.   iaAPattern *             = iaDummy + 10H;
  3463.   iaAPatSize *             = iaDummy + 11H;
  3464.   iaMode *                 = iaDummy + 12H;
  3465.   iaFont *                 = iaDummy + 13H;
  3466.   iaOutline *              = iaDummy + 14H;
  3467.   iaRecessed *             = iaDummy + 15H;
  3468.   iaDoubleEmboss *         = iaDummy + 16H;
  3469.   iaEdgesOnly *            = iaDummy + 17H;
  3470.  
  3471. (**** "sysiclass" attributes                    *****)
  3472.   sysiaSize *              = iaDummy + 0BH;
  3473.                     (* #define's below          *)
  3474.   sysiaDepth *             = iaDummy + 0CH;
  3475.                     (* this is unused by Intuition.  sysiaDrawInfo
  3476.                      * is used instead for V36
  3477.                      *)
  3478.   sysiaWhich *             = iaDummy + 0DH;
  3479.                     (* see #define's below      *)
  3480.   sysiaDrawInfo *          = iaDummy + 18H;
  3481.                     (* pass to sysiclass, please *)
  3482.  
  3483. (*****  obsolete: don't use these, use iaPens  *****)
  3484.   sysiaPens *              = iaPens;
  3485.   iaShadowPen *            = iaDummy + 09H;
  3486.   iaHighlightPen *         = iaDummy + 0AH;
  3487.  
  3488. (* New for V39: *)
  3489.   sysiaReferenceFont * = iaDummy + 19H;
  3490.                     (* Font to use as reference for scaling
  3491.                      * certain sysiclass images
  3492.                      *)
  3493.   iaSupportsDisable * = iaDummy + 1AH;
  3494.                     (* By default, Intuition ghosts gadgets itself,
  3495.                      * instead of relying on idsDisabled or
  3496.                      * idsSelectedDisabled.  An imageclass that
  3497.                      * supports these states should return this attribute
  3498.                      * as TRUe.  You cannot set or clear this attribute,
  3499.                      * however.
  3500.                      *)
  3501.  
  3502.   iaFrameType * = iaDummy + 1BH;
  3503.                     (* Starting with V39, FrameIClass recognizes
  3504.                      * several standard types of frame.  Use one
  3505.                      * of the frame* specifiers below.  Defaults
  3506.                      * to frameDefault.
  3507.                      *)
  3508.  
  3509. (** next attribute: (iaDummy + 1CH)   **)
  3510. (*************************************************)
  3511.  
  3512. (* data values for sysiaSize   *)
  3513.   sysISizeMedRes * = 0;
  3514.   sysISizeLowRes * = 1;
  3515.   sysISizeHires *  = 2;
  3516.  
  3517. (*
  3518.  * sysiaWhich tag data values:
  3519.  * Specifies which system gadget you want an image for.
  3520.  * Some numbers correspond to internal Intuition #defines
  3521.  *)
  3522.   depthImage *      = 00H;
  3523.   zoomImage *       = 01H;
  3524.   sizeImage *       = 02H;
  3525.   closeImage *      = 03H;
  3526.   sDepthImage *     = 05H; (* screen depth gadget *)
  3527.   leftImage *       = 0AH;
  3528.   upImage *         = 0BH;
  3529.   rightImage *      = 0CH;
  3530.   downImage *       = 0DH;
  3531.   checkImage *      = 0EH;
  3532.   mxImage *         = 0FH; (* mutual exclude "button" *)
  3533. (* New for V39: *)
  3534.   menuCheck * = 10H;       (* Menu checkmark image *)
  3535.   amigaKey * = 11H;        (* Menu Amiga-key image *)
  3536.  
  3537. (* Data values for iaFrameType (recognized by FrameIClass)
  3538.  *
  3539.  * frameDefault:  The standard V37-type frame, which has
  3540.  *      thin edges.
  3541.  * frameButton:  Standard button gadget frames, having thicker
  3542.  *      sides and nicely edged corners.
  3543.  * frameRidge:  A ridge such as used by standard string gadgets.
  3544.  *      You can recess the ridge to get a groove image.
  3545.  * frameIconDropBox: A broad ridge which is the standard imagery
  3546.  *      for areas in AppWindows where icons may be dropped.
  3547.  *)
  3548.  
  3549.   frameDefault * = 0;
  3550.   frameButton * = 1;
  3551.   frameRidge * = 2;
  3552.   frameIconDropBox * = 3;
  3553.  
  3554.  
  3555. (* image message id's   *)
  3556.   imDraw *       = 202H;  (* draw yourself, with "state"          *)
  3557.   imHitTest *    = 203H;  (* return TRUE if click hits image      *)
  3558.   imErase *      = 204H;  (* erase yourself                       *)
  3559.   imMove *       = 205H;  (* draw new and erase old, smoothly     *)
  3560.  
  3561.   imDrawFrame *  = 206H;  (* draw with specified dimensions       *)
  3562.   imFrameBox *   = 207H;  (* get recommended frame around some box*)
  3563.   imHitFrame *   = 208H;  (* hittest with dimensions              *)
  3564.   imEraseFrame * = 209H;  (* hittest with dimensions              *)
  3565.  
  3566. (* image draw states or styles, for imDRAW *)
  3567. (* Note that they have no bitwise meanings (unfortunately) *)
  3568.   idsNormal *           = 0;
  3569.   idsSelected *         = 1;    (* for selected gadgets     *)
  3570.   idsDisabled *         = 2;    (* for disabled gadgets     *)
  3571.   idsBusy *             = 3;    (* for future functionality *)
  3572.   idsIndeterminate *    = 4;    (* for future functionality *)
  3573.   idsInactiveNormal *   = 5;    (* normal, in inactive window border *)
  3574.   idsInactiveSelected * = 6;    (* selected, in inactive bor`er *)
  3575.   idsInactiveDisabled * = 7;    (* disabled, in inactive border *)
  3576.   idsSelectedDisabled * = 8;    (* disabled and selected    *)
  3577.  
  3578. (* oops, please forgive spelling error by jimm *)
  3579.   idsIndeterminant * = idsIndeterminate;
  3580.  
  3581. (* imFrameBox  *)
  3582.  
  3583. TYPE
  3584.  
  3585.   FrameBox * = RECORD (MsgBase)
  3586.     msg *         : Msg;
  3587.     contentsBox * : IBoxPtr;     (* input: relative box of contents *)
  3588.     frameBox *    : IBoxPtr;     (* output: rel. box of encl frame  *)
  3589.     drInfo *      : DrawInfoPtr; (* NB: May be NULL *)
  3590.     frameFlags *  : s.SET32;
  3591.   END; (* FrameBox *)
  3592.  
  3593. CONST
  3594.  
  3595.   frameSpecify  * = 0;  (* Make do with the dimensions of FrameBox
  3596.                          * provided.
  3597.                          *)
  3598.  
  3599. (* imDraw, imDrawFrame        *)
  3600.  
  3601. TYPE
  3602.  
  3603.   Dimensions = RECORD
  3604.     width * : INTEGER;
  3605.     height * : INTEGER;
  3606.   END; (* Dimensions *)
  3607.  
  3608.   Draw * = RECORD (MsgBase)
  3609.     msg *        : Msg;
  3610.     rPort *      : gfx.RastPortPtr;
  3611.     offset *     : gfx.Point;
  3612.     state *      : e.ULONG;
  3613.     drInfo *     : DrawInfoPtr;    (* NB: May be NULL *)
  3614.  
  3615.     (* these parameters only valid for imDRAWFRAME *)
  3616.     dimensions * : Dimensions;
  3617.   END; (* Draw *)
  3618.  
  3619. (* imErase, imEraseFrame      *)
  3620. (* NOTE: This is a subset of Draw    *)
  3621.  
  3622. TYPE
  3623.  
  3624.   Erase * = RECORD (MsgBase)
  3625.     msg *        : Msg;
  3626.     rPort *      : gfx.RastPortPtr;
  3627.     offset *     : gfx.Point;
  3628.  
  3629.     (* these parameters only valid for imERASEFRAME *)
  3630.     dimensions * : Dimensions;
  3631.   END; (* Erase *)
  3632.  
  3633. (* imHitTest, imHitFrame      *)
  3634.  
  3635. TYPE
  3636.  
  3637.   IMHitTest * = RECORD (MsgBase)
  3638.     msg *         : Msg;
  3639.     point *       : gfx.Point;
  3640.  
  3641.     (* these parameters only valid for imHitFrame *)
  3642.     dimensions * : Dimensions;
  3643.   END; (* IMHitTest *)
  3644.  
  3645. (*
  3646. **  $VER: pointerclass.h 39.6 (15.2.93)
  3647. **
  3648. **  'boopsi' pointer class interface
  3649. *)
  3650.  
  3651. (* The following tags are recognized at NewObject() time by
  3652.  * pointerclass:
  3653.  *
  3654.  * pointeraBitMap (BitMapPtr) - Pointer to bitmap to
  3655.  *      get pointer imagery from.  Bitplane data need not be
  3656.  *      in chip RAM.
  3657.  * pointeraXOffset (LONG) - X-offset of the pointer hotspot.
  3658.  * pointeraYOffset (LONG) - Y-offset of the pointer hotspot.
  3659.  * pointeraWordWidth (ULONG) - designed width of the pointer in words
  3660.  * pointeraXResolution (ULONG) - one of the pointerXResn* flags below
  3661.  * pointeraYResolution (ULONG) - one of the pointerYResn* flags below
  3662.  *
  3663.  *)
  3664.  
  3665. CONST
  3666.  
  3667.   pointeraDummy *       = u.user + 039000H;
  3668.  
  3669.   pointeraBitMap *      = pointeraDummy + 01H;
  3670.   pointeraXOffset *     = pointeraDummy + 02H;
  3671.   pointeraYOffset *     = pointeraDummy + 03H;
  3672.   pointeraWordWidth *   = pointeraDummy + 04H;
  3673.   pointeraXResolution * = pointeraDummy + 05H;
  3674.   pointeraYResolution * = pointeraDummy + 06H;
  3675.  
  3676. (* These are the choices for the pointeraXResolution attribute which
  3677.  * will determine what resolution pixels are used for this pointer.
  3678.  *
  3679.  * pointerXResnDefault (ECS-compatible pointer width)
  3680.  *      = 70 ns if SUPERHIRES-type mode, 140 ns if not
  3681.  *
  3682.  * pointerXResnScreenRes
  3683.  *      = Same as pixel speed of screen
  3684.  *
  3685.  * pointerXResnLores (pointer always in lores-like pixels)
  3686.  *      = 140 ns in 15kHz modes, 70 ns in 31kHz modes
  3687.  *
  3688.  * pointerXResnHires (pointer always in hires-like pixels)
  3689.  *      = 70 ns in 15kHz modes, 35 ns in 31kHz modes
  3690.  *
  3691.  * pointerXResn140ns (pointer always in 140 ns pixels)
  3692.  *      = 140 ns always
  3693.  *
  3694.  * pointerXResn70ns (pointer always in 70 ns pixels)
  3695.  *      = 70 ns always
  3696.  *
  3697.  * pointerXResn35ns (pointer always in 35 ns pixels)
  3698.  *      = 35 ns always
  3699.  *)
  3700.  
  3701. CONST
  3702.  
  3703.   pointerXResnDefault *   = 0;
  3704.   pointerXResn140ns *     = 1;
  3705.   pointerXResn70ns *      = 2;
  3706.   pointerXResn35ns *      = 3;
  3707.  
  3708.   pointerXResnScreenRes * = 4;
  3709.   pointerXResnLores *     = 5;
  3710.   pointerXResnHires *     = 6;
  3711.  
  3712. (* These are the choices for the pointeraYResolution attribute which
  3713.  * will determine what vertical resolution is used for this pointer.
  3714.  *
  3715.  * pointerYResnDefault
  3716.  *      = In 15 kHz modes, the pointer resolution will be the same
  3717.  *        as a non-interlaced screen.  In 31 kHz modes, the pointer
  3718.  *        will be doubled vertically.  This means there will be about
  3719.  *        200-256 pointer lines per screen.
  3720.  *
  3721.  * pointerYResnHigh
  3722.  * pointerYResnHighAspect
  3723.  *      = Where the hardware/software supports it, the pointer resolution
  3724.  *        will be high.  This means there will be about 400-480 pointer
  3725.  *        lines per screen.  pointerYResnHighAspect also means that
  3726.  *        when the pointer comes out double-height due to hardware/software
  3727.  *        restrictions, its width would be doubled as well, if possible
  3728.  *        (to preserve aspect).
  3729.  *
  3730.  * pointerYResnScreenRes
  3731.  * pointerYResnScreenResAspect
  3732.  *      = Will attempt to match the vertical resolution of the pointer
  3733.  *        to the screen's vertical resolution.  pointerYResnScreenAspect also
  3734.  *        means that when the pointer comes out double-height due to
  3735.  *        hardware/software restrictions, its width would be doubled as well,
  3736.  *        if possible (to preserve aspect).
  3737.  *
  3738.  *)
  3739.  
  3740. CONST
  3741.  
  3742.   pointerYResnDefault * = 0;
  3743.   pointerYResnHigh * = 2;
  3744.   pointerYResnHighAspect * = 3;
  3745.   pointerYResnScreenRes * = 4;
  3746.   pointerYResnScreenResAspect * = 5;
  3747.  
  3748. (* Compatibility note:
  3749.  *
  3750.  * The AA chipset supports variable sprite width and resolution, but
  3751.  * the setting of width and resolution is global for all sprites.
  3752.  * When no other sprites are in use, Intuition controls the sprite
  3753.  * width and sprite resolution for correctness based on pointerclass
  3754.  * attributes specified by the creator of the pointer.  Intuition
  3755.  * controls sprite resolution with the vtagDefSpriteResnSet tag
  3756.  * to VideoControl().  Applications can override this on a per-viewport
  3757.  * basis with the vtagSpriteResnSet tag to VideoControl().
  3758.  *
  3759.  * If an application uses a sprite other than the pointer sprite,
  3760.  * Intuition will automatically regenerate the pointer sprite's image in
  3761.  * a compatible width.  This might involve BitMap scaling of the imagery
  3762.  * you supply.
  3763.  *
  3764.  * If any sprites other than the pointer sprite were obtained with the
  3765.  * old GetSprite() call, Intuition assumes that the owner of those
  3766.  * sprites is unaware of sprite resolution, hence Intuition will set the
  3767.  * default sprite resolution (vtagDefSpriteResnSet) to ECS-compatible,
  3768.  * instead of as requested by the various pointerclass attributes.
  3769.  *
  3770.  * No resolution fallback occurs when applications use ExtSprites.
  3771.  * Such applications are expected to use vtagSpriteResnSet tag if
  3772.  * necessary.
  3773.  *
  3774.  * NB:  Under release V39, only sprite width compatibility is implemented.
  3775.  * Sprite resolution compatibility was added for V40.
  3776.  *)
  3777.  
  3778. (*
  3779. **  $VER: intuitionbase.h 38.0 (12.6.91)
  3780. **
  3781. **  Public part of IntuitionBase structure and supporting structures
  3782. *)
  3783.  
  3784.  
  3785. CONST
  3786.  
  3787. (* these are the display modes for which we have corresponding parameter
  3788.  * settings in the config arrays
  3789.  *)
  3790.   dModeCount *      = 0002H;  (* how many modes there are *)
  3791.   hiresPick *       = 0000H;
  3792.   lowresPick *      = 0001H;
  3793.  
  3794.   eventMax * = 10;             (* size of event array *)
  3795.  
  3796. (* these are the system Gadget defines *)
  3797.   resCount *        = 2;
  3798.   hiresGadget *     = 0;
  3799.   lowresGadget *    = 1;
  3800.  
  3801.   gadgetCount *     = 8;
  3802.   upFrontGadget *   = 0;
  3803.   downBackGadget *  = 1;
  3804.   sizeGadget *      = 2;
  3805.   closeGadget *     = 3;
  3806.   dragGadget *      = 4;
  3807.   sUpFrontGadget *  = 5;
  3808.   sDownBackGadget * = 6;
  3809.   sDragGadget *     = 7;
  3810.  
  3811. (* ======================================================================== *)
  3812. (* === IntuitionBase ====================================================== *)
  3813. (* ======================================================================== *)
  3814. (*
  3815.  * Be sure to protect yourself against someone modifying these data as
  3816.  * you look at them.  This is done by calling:
  3817.  *
  3818.  * lock = LockIBase(0), which returns a e.ULONgfx.  When done call
  3819.  * UnlockIBase(lock) where lock is what LockIBase() returned.
  3820.  *)
  3821.  
  3822. TYPE
  3823.  
  3824. (* This structure is strictly READ ONLY *)
  3825.  
  3826.   IntuitionBasePtr * = POINTER TO IntuitionBase;
  3827.   IntuitionBase * = RECORD (e.LibraryBase)
  3828.     libNode -      : e.Library;
  3829.     viewLord -     : gfx.View;
  3830.  
  3831.     activeWindow - : WindowPtr;
  3832.     activeScreen - : ScreenPtr;
  3833.  
  3834.     (* the FirstScreen variable points to the frontmost Screen.  Screens are
  3835.      * then maintained in a front to back order using Screen.NextScreen
  3836.      *)
  3837.     firstScreen -  : ScreenPtr;        (* for linked list of all screens *)
  3838.  
  3839.     ibFlags -      : s.SET32;          (* values are all system private *)
  3840.     mouseY -, mouseX - : INTEGER;
  3841.                         (* note "backwards" order of these              *)
  3842.  
  3843.     time -         : t.TimeVal         (* timestamp of most current input event *)
  3844.  
  3845.     (* I told you this was private.
  3846.      * The data beyond this point has changed, is changing, and
  3847.      * will continue to change.
  3848.      *)
  3849.   END; (* IntuitionBase *)
  3850.  
  3851.  
  3852. (*-- Library Base variable --------------------------------------------*)
  3853.  
  3854. VAR
  3855.  
  3856.   int *, base * : IntuitionBasePtr;
  3857.  
  3858. CONST
  3859.  
  3860.   intuitionName * = "intuition.library";
  3861.  
  3862. (*-- Library Functions ------------------------------------------------*)
  3863.  
  3864. (* Boolean Parameters must be 4 Bytes long: *)
  3865.  
  3866. TYPE
  3867.   LONGBOOL * = e.LONGBOOL;
  3868.  
  3869. CONST
  3870.   LTRUE  * = e.LTRUE;
  3871.   LFALSE * = e.LFALSE;
  3872.  
  3873. (*
  3874. **      $VER: intuition_protos.h 38.16 (28.8.92)
  3875. *)
  3876.  
  3877. (* Public functions OpenIntuition () and Intuition () are intentionally *)
  3878. (* not documented. *)
  3879.  
  3880. PROCEDURE OpenIntuition* [base,-30] ();
  3881. PROCEDURE Intuition* [base,-36]
  3882.   ( iEvent [8] : ie.InputEventDummyPtr );
  3883. PROCEDURE AddGadget* [base,-42]
  3884.   ( window     [8] : WindowPtr;
  3885.     VAR gadget [9] : Gadget;
  3886.     position   [0] : LONGINT )
  3887.   : e.UWORD;
  3888. PROCEDURE ClearDMRequest* [base,-48]
  3889.   ( window [8] : WindowPtr )
  3890.   : BOOLEAN;
  3891. PROCEDURE ClearMenuStrip* [base,-54]
  3892.   ( window [8] : WindowPtr );
  3893. PROCEDURE ClearPointer* [base,-60]
  3894.   ( window [8] : WindowPtr );
  3895. PROCEDURE CloseScreen* [base,-66]
  3896.   ( screen [8] : ScreenPtr )
  3897.   : BOOLEAN;
  3898. PROCEDURE OldCloseScreen* [base,-66]
  3899.   ( screen [8] : ScreenPtr );
  3900. PROCEDURE CloseWindow* [base,-72]
  3901.   ( window [8] : WindowPtr );
  3902. PROCEDURE CloseWorkBench* [base,-78] ()
  3903.   : BOOLEAN;
  3904. PROCEDURE CurrentTime* [base,-84]
  3905.   ( VAR seconds [8] : e.ULONG;
  3906.     VAR micros  [9] : e.ULONG );
  3907. PROCEDURE DisplayAlert* [base,-90]
  3908.   ( alertNumber [0] : e.ULONG;
  3909.     string      [8] : ARRAY OF CHAR;
  3910.     height      [1] : LONGINT )
  3911.   : BOOLEAN;
  3912. PROCEDURE DisplayBeep* [base,-96]
  3913.   ( screen [8] : ScreenPtr );
  3914. PROCEDURE DoubleClick* [base,-102]
  3915.   ( sSeconds [0] : e.ULONG;
  3916.     sMicros  [1] : e.ULONG;
  3917.     cSeconds [2] : e.ULONG;
  3918.     cMicros  [3] : e.ULONG )
  3919.   : BOOLEAN;
  3920. PROCEDURE DrawBorder* [base,-108]
  3921.   ( rp         [8] : gfx.RastPortPtr;
  3922.     border     [9] : BorderPtr;
  3923.     leftOffset [0] : LONGINT;
  3924.     topOffset  [1] : LONGINT );
  3925. PROCEDURE DrawImage* [base,-114]
  3926.   ( rp         [8] : gfx.RastPortPtr;
  3927.     VAR image  [9] : Image;
  3928.     leftOffset [0] : LONGINT;
  3929.     topOffset  [1] : LONGINT );
  3930. PROCEDURE EndRequest* [base,-120]
  3931.   ( requester [8] : RequesterPtr;
  3932.     window    [9] : WindowPtr );
  3933. PROCEDURE GetDefPrefs* [base,-126]
  3934.   ( VAR preferences [8] : ARRAY OF SYS.BYTE;
  3935.     size            [0] : LONGINT );
  3936. PROCEDURE GetPrefs* [base,-132]
  3937.   ( VAR preferences [8] : ARRAY OF SYS.BYTE;
  3938.     size            [0] : LONGINT );
  3939. PROCEDURE InitRequester* [base,-138]
  3940.   ( VAR requester [8] : Requester );
  3941. PROCEDURE ItemAddress* [base,-144]
  3942.   ( VAR menuStrip [8] : Menu;
  3943.     menuNumber    [0] : LONGINT )
  3944.   : MenuItemPtr;
  3945. PROCEDURE ModifyIDCMP* [base,-150]
  3946.   ( window [8] : WindowPtr;
  3947.     flags  [0] : s.SET32 )
  3948.   : BOOLEAN;
  3949. PROCEDURE OldModifyIDCMP* [base,-150]
  3950.   ( window [8] : WindowPtr;
  3951.     flags  [0] : s.SET32 );
  3952. PROCEDURE ModifyProp* [base,-156]
  3953.   ( VAR gadget [8] : Gadget;
  3954.     window     [9] : WindowPtr;
  3955.     requester [10] : RequesterPtr;
  3956.     flags      [0] : s.SET16;
  3957.     horizPot   [1] : LONGINT;
  3958.     vertPot    [2] : LONGINT;
  3959.     horizBody  [3] : LONGINT;
  3960.     vertBody   [4] : LONGINT );
  3961. PROCEDURE MoveScreen* [base,-162]
  3962.   ( screen [8] : ScreenPtr;
  3963.     dx     [0] : LONGINT;
  3964.     dy     [1] : LONGINT );
  3965. PROCEDURE MoveWindow* [base,-168]
  3966.   ( window [8] : WindowPtr;
  3967.     dx     [0] : LONGINT;
  3968.     dy     [1] : LONGINT );
  3969. PROCEDURE OffGadget* [base,-174]
  3970.   ( VAR gadget [8] : Gadget;
  3971.     window     [9] : WindowPtr;
  3972.     requester [10] : RequesterPtr );
  3973. PROCEDURE OffMenu* [base,-180]
  3974.   ( window     [8] : WindowPtr;
  3975.     menuNumber [0] : e.ULONG );
  3976. PROCEDURE OnGadget* [base,-186]
  3977.   ( VAR gadget [8] : Gadget;
  3978.     window     [9] : WindowPtr;
  3979.     requester [10] : RequesterPtr );
  3980. PROCEDURE OnMenu* [base,-192]
  3981.   ( window     [8] : WindowPtr;
  3982.     menuNumber [0] : e.ULONG );
  3983. PROCEDURE OpenScreen* [base,-198]
  3984.   ( VAR newScreen [8] : NewScreenBase )
  3985.   : ScreenPtr;
  3986. PROCEDURE OpenWindow* [base,-204]
  3987.   ( VAR newWindow [8] : NewWindowBase )
  3988.   : WindowPtr;
  3989. PROCEDURE OpenWorkBench* [base,-210] ()
  3990.   : ScreenPtr;
  3991. PROCEDURE PrintIText* [base,-216]
  3992.   ( rp        [8] : gfx.RastPortPtr;
  3993.     VAR iText [9] : IntuiText;
  3994.     left      [0] : LONGINT;
  3995.     top       [1] : LONGINT );
  3996. PROCEDURE RefreshGadgets* [base,-222]
  3997.   ( gadgets    [8] : GadgetPtr;
  3998.     window     [9] : WindowPtr;
  3999.     requester [10] : RequesterPtr );
  4000. PROCEDURE RemoveGadget* [base,-228]
  4001.   ( window     [8] : WindowPtr;
  4002.     VAR gadget [9] : Gadget )
  4003.   : e.UWORD;
  4004.  
  4005. (* The official calling sequence for ReportMouse is given below. *)
  4006. (* Note the register order.  For the complete story; read the ReportMouse *)
  4007. (* autodoc. *)
  4008.  
  4009. PROCEDURE ReportMouse* [base,-234]
  4010.   ( window [8] : WindowPtr;
  4011.     flag   [0] : e.LBOOL );
  4012. PROCEDURE Request* [base,-240]
  4013.   ( requester [8] : RequesterPtr;
  4014.     window    [9] : WindowPtr )
  4015.   : BOOLEAN;
  4016. PROCEDURE ScreenToBack* [base,-246]
  4017.   ( screen [8] : ScreenPtr );
  4018. PROCEDURE ScreenToFront* [base,-252]
  4019.   ( screen [8] : ScreenPtr );
  4020. PROCEDURE SetDMRequest* [base,-258]
  4021.   ( window    [8] : WindowPtr;
  4022.     requester [9] : RequesterPtr )
  4023.   : BOOLEAN;
  4024. PROCEDURE SetMenuStrip* [base,-264]
  4025.   ( window   [8] : WindowPtr;
  4026.     VAR menu [9] : Menu )
  4027.   : BOOLEAN;
  4028. PROCEDURE SetPointer* [base,-270]
  4029.   ( window  [8] : WindowPtr;
  4030.     pointer [9] : ARRAY OF SYS.BYTE;
  4031.     height  [0] : LONGINT;
  4032.     width   [1] : LONGINT;
  4033.     xOffset [2] : LONGINT;
  4034.     yOffset [3] : LONGINT );
  4035. PROCEDURE SetWindowTitles* [base,-276]
  4036.   ( window       [8] : WindowPtr;
  4037.     windowTitle  [9] : e.LSTRPTR;
  4038.     screenTitle [10] : e.LSTRPTR );
  4039. PROCEDURE SetWindowTitlesStr* [base,-276]
  4040.   ( window       [8] : WindowPtr;
  4041.     windowTitle  [9] : ARRAY OF CHAR;
  4042.     screenTitle [10] : ARRAY OF CHAR );
  4043. PROCEDURE ShowTitle* [base,-282]
  4044.   ( screen [8] : ScreenPtr;
  4045.     showIt [0] : e.LBOOL );
  4046. PROCEDURE SizeWindow* [base,-288]
  4047.   ( window [8] : WindowPtr;
  4048.     dx     [0] : LONGINT;
  4049.     dy     [1] : LONGINT );
  4050. PROCEDURE ViewAddress* [base,-294] ()
  4051.   : gfx.ViewPtr;
  4052. PROCEDURE ViewPortAddress* [base,-300]
  4053.   ( window [8] : WindowPtr )
  4054.   : gfx.ViewPortPtr;
  4055. PROCEDURE WindowToBack* [base,-306]
  4056.   ( window [8] : WindowPtr );
  4057. PROCEDURE WindowToFront* [base,-312]
  4058.   ( window [8] : WindowPtr );
  4059. PROCEDURE WindowLimits* [base,-318]
  4060.   ( window    [8] : WindowPtr;
  4061.     widthMin  [0] : LONGINT;
  4062.     heightMin [1] : LONGINT;
  4063.     widthMax  [2] : LONGINT;
  4064.     heightMax [3] : LONGINT )
  4065.   : BOOLEAN;
  4066.  
  4067. (* --- start of next generation of names -------------------------------------*)
  4068.  
  4069. PROCEDURE SetPrefs* [base,-324]
  4070.   ( preferences [8] : ARRAY OF SYS.BYTE;
  4071.     size        [0] : LONGINT;
  4072.     inform      [1] : e.LBOOL );
  4073.  
  4074. (* --- start of next next generation of names --------------------------------*)
  4075.  
  4076. PROCEDURE IntuiTextLength* [base,-330]
  4077.   ( VAR iText [8] : IntuiText )
  4078.   : INTEGER;
  4079. PROCEDURE WBenchToBack* [base,-336] ()
  4080.   : BOOLEAN;
  4081. PROCEDURE WBenchToFront* [base,-342] ()
  4082.   : BOOLEAN;
  4083.  
  4084. (* --- start of next next next generation of names ---------------------------*)
  4085.  
  4086. PROCEDURE AutoRequest* [base,-348]
  4087.   ( window   [8] : WindowPtr;
  4088.     body     [9] : IntuiTextPtr;
  4089.     posText [10] : IntuiTextPtr;
  4090.     negText [11] : IntuiTextPtr;
  4091.     pFlag    [0] : s.SET32;
  4092.     nFlag    [1] : s.SET32;
  4093.     width    [2] : LONGINT;
  4094.     height   [3] : LONGINT )
  4095.   : BOOLEAN;
  4096. PROCEDURE BeginRefresh* [base,-354]
  4097.   ( window [8] : WindowPtr );
  4098. PROCEDURE BuildSysRequest* [base,-360]
  4099.   ( window   [8] : WindowPtr;
  4100.     body     [9] : IntuiTextPtr;
  4101.     posText [10] : IntuiTextPtr;
  4102.     negText [11] : IntuiTextPtr;
  4103.     flags    [0] : s.SET32;
  4104.     width    [1] : LONGINT;
  4105.     height   [2] : LONGINT )
  4106.   : WindowPtr;
  4107. PROCEDURE EndRefresh* [base,-366]
  4108.   ( window   [8] : WindowPtr;
  4109.     complete [0] : e.LBOOL );
  4110. PROCEDURE FreeSysRequest* [base,-372]
  4111.   ( window [8] : WindowPtr );
  4112. PROCEDURE MakeScreen* [base,-378]
  4113.   ( screen [8] : ScreenPtr );
  4114. PROCEDURE RemakeDisplay* [base,-384] ();
  4115. PROCEDURE RethinkDisplay* [base,-390] ();
  4116.  
  4117. (* --- start of next next next next generation of names ----------------------*)
  4118.  
  4119. PROCEDURE AllocRemember* [base,-396]
  4120.   ( VAR rememberKey [8] : RememberPtr;
  4121.     size            [0] : e.ULONG;
  4122.     flags           [1] : s.SET32 )
  4123.   : e.APTR;
  4124.  
  4125. (* Public function AlohaWorkbench () is intentionally not documented *)
  4126.  
  4127. PROCEDURE AlohaWorkbench* [base,-402]
  4128.   ( wbport [8] : e.MsgPortPtr );
  4129. PROCEDURE FreeRemember* [base,-408]
  4130.   ( VAR rememberPtr [8] : RememberPtr;
  4131.     reallyForget    [0] : e.LBOOL );
  4132.  
  4133. (* --- start of 15 Nov 85 names ------------------------*)
  4134.  
  4135. PROCEDURE LockIBase* [base,-414]
  4136.   ( dontknow [0] : e.ULONG )
  4137.   : e.ULONG;
  4138. PROCEDURE UnlockIBase* [base,-420]
  4139.   ( ibLock [8] : e.ULONG );
  4140.  
  4141. (* --- functions in V33 or higher (distributed as Release 1.2) ---*)
  4142.  
  4143. PROCEDURE GetScreenData* [base,-426]
  4144.   ( VAR buffer [8] : Screen;
  4145.     size       [0] : e.ULONG;
  4146.     type       [1] : s.SET16;
  4147.     screen     [9] : ScreenPtr )
  4148.   : BOOLEAN;
  4149. PROCEDURE RefreshGList* [base,-432]
  4150.   ( gadgets    [8] : GadgetPtr;
  4151.     window     [9] : WindowPtr;
  4152.     requester [10] : RequesterPtr;
  4153.     numGad     [0] : LONGINT );
  4154. PROCEDURE AddGList* [base,-438]
  4155.   ( window     [8] : WindowPtr;
  4156.     gadget     [9] : GadgetPtr;
  4157.     position   [0] : LONGINT;
  4158.     numGad     [1] : LONGINT;
  4159.     requester [10] : RequesterPtr )
  4160.   : e.UWORD;
  4161. PROCEDURE RemoveGList* [base,-444]
  4162.   ( remPtr [8] : WindowPtr;
  4163.     gadget [9] : GadgetPtr;
  4164.     numGad [0] : LONGINT )
  4165.   : e.UWORD;
  4166. PROCEDURE ActivateWindow* [base,-450]
  4167.   ( window [8] : WindowPtr );
  4168. PROCEDURE RefreshWindowFrame* [base,-456]
  4169.   ( window [8] : WindowPtr );
  4170. PROCEDURE ActivateGadget* [base,-462]
  4171.   ( VAR gadgets [8] : Gadget;
  4172.     window      [9] : WindowPtr;
  4173.     requester  [10] : RequesterPtr )
  4174.   : BOOLEAN;
  4175. PROCEDURE NewModifyProp* [base,-468]
  4176.   ( VAR gadget [8] : Gadget;
  4177.     window     [9] : WindowPtr;
  4178.     requester [10] : RequesterPtr;
  4179.     flags      [0] : s.SET16;
  4180.     horizPot   [1] : LONGINT;
  4181.     vertPot    [2] : LONGINT;
  4182.     horizBody  [3] : LONGINT;
  4183.     vertBody   [4] : LONGINT;
  4184.     numGad     [5] : LONGINT );
  4185.  
  4186. (* --- functions in V36 or higher (distributed as Release 2.0) ---*)
  4187.  
  4188. PROCEDURE QueryOverscan* [base,-474]
  4189.   ( displayID [8] : e.ULONG;
  4190.     VAR rect  [9] : gfx.Rectangle;
  4191.     oScanType [0] : LONGINT )
  4192.   : LONGINT;
  4193. PROCEDURE MoveWindowInFrontOf* [base,-480]
  4194.   ( window       [8] : WindowPtr;
  4195.     behindWindow [9] : WindowPtr );
  4196. PROCEDURE ChangeWindowBox* [base,-486]
  4197.   ( window [8] : WindowPtr;
  4198.     left   [0] : LONGINT;
  4199.     top    [1] : LONGINT;
  4200.     width  [2] : LONGINT;
  4201.     height [3] : LONGINT );
  4202. PROCEDURE SetEditHook* [base,-492]
  4203.   ( hook [8] : u.HookPtr )
  4204.   : u.HookPtr;
  4205. PROCEDURE SetMouseQueue* [base,-498]
  4206.   ( window      [8] : WindowPtr;
  4207.     queueLength [0] : LONGINT )
  4208.   : LONGINT;
  4209. PROCEDURE ZipWindow* [base,-504]
  4210.   ( window [8] : WindowPtr );
  4211.  
  4212. (* --- public screens ---*)
  4213.  
  4214. PROCEDURE LockPubScreen* [base,-510]
  4215.   ( name [8] : ARRAY OF CHAR )
  4216.   : ScreenPtr;
  4217. PROCEDURE UnlockPubScreen* [base,-516]
  4218.   ( name   [8] : ARRAY OF CHAR;
  4219.     screen [9] : ScreenPtr );
  4220. PROCEDURE LockPubScreenList* [base,-522] ()
  4221.   : e.ListPtr;
  4222. PROCEDURE UnlockPubScreenList* [base,-528] ();
  4223. PROCEDURE NextPubScreen* [base,-534]
  4224.   ( screen      [8] : ScreenPtr;
  4225.     VAR nameBuf [9] : ARRAY OF CHAR )
  4226.   : e.LSTRPTR;
  4227. PROCEDURE SetDefaultPubScreen* [base,-540]
  4228.   ( name [8] : ARRAY OF CHAR );
  4229. PROCEDURE SetPubScreenModes* [base,-546]
  4230.   ( modes [0] : s.SET16 )
  4231.   : s.SET16;
  4232. PROCEDURE PubScreenStatus* [base,-552]
  4233.   ( screen      [8] : ScreenPtr;
  4234.     statusFlags [0] : s.SET16 )
  4235.   : s.SET16;
  4236.  
  4237. PROCEDURE ObtainGIRPort* [base,-558]
  4238.   ( gInfo [8] : GadgetInfoPtr )
  4239.   : gfx.RastPortPtr;
  4240. PROCEDURE ReleaseGIRPort* [base,-564]
  4241.   ( rp [8] : gfx.RastPortPtr );
  4242. PROCEDURE GadgetMouse* [base,-570]
  4243.   ( VAR gadget      [8] : Gadget;
  4244.     gInfo           [9] : GadgetInfoPtr;
  4245.     VAR mousePoint [10] : gfx.Point );
  4246. PROCEDURE GetDefaultPubScreen* [base,-582]
  4247.   ( VAR nameBuffer [8] : ARRAY OF CHAR );
  4248. PROCEDURE EasyRequestArgs* [base,-588]
  4249.   ( window     [8] : WindowPtr;
  4250.     easyStruct [9] : EasyStructPtr;
  4251.     idcmpPtr  [10] : e.APTR;
  4252.     args      [11] : e.APTR )
  4253.   : LONGINT;
  4254. PROCEDURE EasyRequest* [base,-588]
  4255.   ( window     [8]   : WindowPtr;
  4256.     easyStruct [9]   : EasyStructPtr;
  4257.     idcmpPtr  [10]   : e.APTR;
  4258.     args      [11].. : SYS.LONGWORD )
  4259.   : LONGINT;
  4260. PROCEDURE BuildEasyRequestArgs* [base,-594]
  4261.   ( window     [8] : WindowPtr;
  4262.     easyStruct [9] : EasyStructPtr;
  4263.     idcmp      [0] : s.SET32;
  4264.     args      [10] : e.APTR )
  4265.   : WindowPtr;
  4266. PROCEDURE BuildEasyRequest* [base,-594]
  4267.   ( window     [8]   : WindowPtr;
  4268.     easyStruct [9]   : EasyStructPtr;
  4269.     idcmp      [0]   : s.SET32;
  4270.     args      [10].. : SYS.LONGWORD )
  4271.   : WindowPtr;
  4272. PROCEDURE SysReqHandler* [base,-600]
  4273.   ( window    [8] : WindowPtr;
  4274.     idcmpPtr  [9] : e.APTR;
  4275.     waitInput [0] : e.LBOOL )
  4276.   : LONGINT;
  4277. PROCEDURE OpenWindowTagList* [base,-606]
  4278.   ( VAR newWindow [8] : NewWindowBase;
  4279.     tagList       [9] : ARRAY OF u.TagItem )
  4280.   : WindowPtr;
  4281. PROCEDURE OpenWindowTags* [base,-606]
  4282.   ( VAR newWindow [8]   : NewWindowBase;
  4283.     tagList       [9].. : u.Tag )
  4284.   : WindowPtr;
  4285. PROCEDURE OpenWindowTagListA* [base,-606]
  4286.   ( newWindow [8] : NewWindowBasePtr;
  4287.     tagList   [9] : ARRAY OF u.TagItem )
  4288.   : WindowPtr;
  4289. PROCEDURE OpenWindowTagsA* [base,-606]
  4290.   ( newWindow [8]   : NewWindowBasePtr;
  4291.     tagList   [9].. : u.Tag )
  4292.   : WindowPtr;
  4293. PROCEDURE OpenScreenTagList* [base,-612]
  4294.   ( VAR newScreen [8] : NewScreenBase;
  4295.     tagList       [9] : ARRAY OF u.TagItem )
  4296.   : ScreenPtr;
  4297. PROCEDURE OpenScreenTags* [base,-612]
  4298.   ( VAR newScreen [8]   : NewScreenBase;
  4299.     tagList       [9].. : u.Tag )
  4300.   : ScreenPtr;
  4301. PROCEDURE OpenScreenTagListA* [base,-612]
  4302.   ( newScreen [8] : NewScreenBasePtr;
  4303.     tagList   [9] : ARRAY OF u.TagItem )
  4304.   : ScreenPtr;
  4305. PROCEDURE OpenScreenTagsA* [base,-612]
  4306.   ( newScreen [8]   : NewScreenBasePtr;
  4307.     tagList   [9].. : u.Tag )
  4308.   : ScreenPtr;
  4309.  
  4310. (*      new Image functions *)
  4311.  
  4312. PROCEDURE DrawImageState* [base,-618]
  4313.   ( rp         [8] : gfx.RastPortPtr;
  4314.     VAR image  [9] : Image;
  4315.     leftOffset [0] : LONGINT;
  4316.     topOffset  [1] : LONGINT;
  4317.     state      [2] : e.ULONG;
  4318.     drawInfo  [10] : DrawInfoPtr );
  4319. PROCEDURE PointInImageL* [base,-624]
  4320.   ( point     [0] : e.ULONG;
  4321.     VAR image [8] : Image )
  4322.   : BOOLEAN;
  4323. PROCEDURE EraseImage* [base,-630]
  4324.   ( rp         [8] : gfx.RastPortPtr;
  4325.     VAR image  [9] : Image;
  4326.     leftOffset [0] : LONGINT;
  4327.     topOffset  [1] : LONGINT );
  4328.  
  4329. PROCEDURE NewObjectA* [base,-636]
  4330.   ( classPtr [8] : IClassPtr;
  4331.     classID  [9] : ARRAY OF CHAR;
  4332.     tagList [10] : ARRAY OF u.TagItem )
  4333.   : e.APTR;
  4334. PROCEDURE NewObject* [base,-636]
  4335.   ( classPtr [8]   : IClassPtr;
  4336.     classID  [9]   : ARRAY OF CHAR;
  4337.     tagList [10].. : u.Tag )
  4338.   : e.APTR;
  4339.  
  4340. PROCEDURE DisposeObject* [base,-642]
  4341.   ( object [8] : e.APTR );
  4342. PROCEDURE SetAttrsA* [base,-648]
  4343.   ( object  [8] : e.APTR;
  4344.     tagList [9] : ARRAY OF u.TagItem )
  4345.   : e.ULONG;
  4346. PROCEDURE SetAttrs* [base,-648]
  4347.   ( object  [8]   : e.APTR;
  4348.     tagList [9].. : u.Tag )
  4349.   : e.ULONG;
  4350.  
  4351. PROCEDURE GetAttr* [base,-654]
  4352.   ( attrID      [0] : e.ULONG;
  4353.     object      [8] : e.APTR;
  4354.     VAR storage [9] : ARRAY OF SYS.BYTE )
  4355.   : e.ULONG;
  4356.  
  4357. (*      special set attribute call for gadgets *)
  4358.  
  4359. PROCEDURE SetGadgetAttrsA* [base,-660]
  4360.   ( VAR gadget [8] : Gadget;
  4361.     window     [9] : WindowPtr;
  4362.     requester [10] : RequesterPtr;
  4363.     tagList   [11] : ARRAY OF u.TagItem )
  4364.   : e.ULONG;
  4365. PROCEDURE SetGadgetAttrs* [base,-660]
  4366.   ( VAR gadget [8]   : Gadget;
  4367.     window     [9]   : WindowPtr;
  4368.     requester [10]   : RequesterPtr;
  4369.     tagList   [11].. : u.Tag )
  4370.   : e.ULONG;
  4371.  
  4372. (*      for class implementors only *)
  4373.  
  4374. PROCEDURE NextObject* [base,-666]
  4375.   ( VAR objectPtr [8] : ObjectPtr )
  4376.   : e.APTR;
  4377. PROCEDURE FindClass* [base,-672]
  4378.   ( classID [8] : ARRAY OF CHAR)
  4379.   : IClassPtr;
  4380. PROCEDURE MakeClass* [base,-678]
  4381.   ( classID        [8] : ARRAY OF CHAR;
  4382.     superClassID   [9] : ARRAY OF CHAR;
  4383.     superClassPtr [10] : IClassPtr;
  4384.     instanceSize   [0] : LONGINT;
  4385.     flags          [1] : s.SET32 )
  4386.   : IClassPtr;
  4387. PROCEDURE AddClass* [base,-684]
  4388.   ( classPtr [8] : IClassPtr );
  4389.  
  4390.  
  4391. PROCEDURE GetScreenDrawInfo* [base,-690]
  4392.   ( screen [8] : ScreenPtr ) : DrawInfoPtr;
  4393. PROCEDURE FreeScreenDrawInfo* [base,-696]
  4394.   ( screen   [8] : ScreenPtr;
  4395.     drawInfo [9] : DrawInfoPtr );
  4396.  
  4397. PROCEDURE ResetMenuStrip* [base,-702]
  4398.   ( window   [8] : WindowPtr;
  4399.     VAR menu [9] : Menu )
  4400.   : BOOLEAN;
  4401. PROCEDURE RemoveClass* [base,-708]
  4402.   ( classPtr [8] : IClassPtr );
  4403. PROCEDURE FreeClass* [base,-714]
  4404.   ( classPtr [8] : IClassPtr )
  4405.   : BOOLEAN;
  4406.  
  4407. (*--- functions in V39 or higher (Release 3) ---*)
  4408.  
  4409. PROCEDURE AllocScreenBuffer* [base,-768]
  4410.   ( sc    [8] : ScreenPtr;
  4411.     bm    [9] : gfx.BitMapPtr;
  4412.     flags [0] : s.SET32 )
  4413.   : ScreenBufferPtr;
  4414. PROCEDURE FreeScreenBuffer* [base,-774]
  4415.   ( sc [8] : ScreenPtr;
  4416.     sb [9] : ScreenBufferPtr );
  4417. PROCEDURE ChangeScreenBuffer* [base,-780]
  4418.   ( sc [8] : ScreenPtr;
  4419.     sb [9] : ScreenBufferPtr )
  4420.   : BOOLEAN;
  4421. PROCEDURE ScreenDepth* [base,-786]
  4422.   ( screen   [8] : ScreenPtr;
  4423.     flags    [0] : s.SET32;
  4424.     reserved [9] : e.APTR );
  4425. PROCEDURE ScreenPosition* [base,-792]
  4426.   ( screen [8] : ScreenPtr;
  4427.     flags  [0] : s.SET32;
  4428.     x1     [1] : LONGINT;
  4429.     y1     [2] : LONGINT;
  4430.     x2     [3] : LONGINT;
  4431.     y2     [4] : LONGINT );
  4432. PROCEDURE ScrollWindowRaster* [base,-798]
  4433.   ( win  [9] : WindowPtr;
  4434.     dx   [0] : LONGINT;
  4435.     dy   [1] : LONGINT;
  4436.     xMin [2] : LONGINT;
  4437.     yMin [3] : LONGINT;
  4438.     xMax [4] : LONGINT;
  4439.     yMax [5] : LONGINT );
  4440. PROCEDURE LendMenus* [base,-804]
  4441.   ( fromwindow [8] : WindowPtr;
  4442.     towindow   [9] : WindowPtr );
  4443. PROCEDURE DoGadgetMethodA* [base,-810]
  4444.   ( gad          [8] : GadgetPtr;
  4445.     win          [9] : WindowPtr;
  4446.     req         [10] : RequesterPtr;
  4447.     VAR message [11] : MsgBase )
  4448.   : e.ULONG;
  4449. PROCEDURE DoGadgetMethod* [base,-810]
  4450.   ( gad      [8]  : GadgetPtr;
  4451.     win      [9]  : WindowPtr;
  4452.     req     [10]  : RequesterPtr;
  4453.     message [11]..: SYS.LONGWORD )
  4454.   : e.ULONG;
  4455. PROCEDURE SetWindowPointerA* [base,-816]
  4456.   ( win     [8] : WindowPtr;
  4457.     taglist [9] : ARRAY OF u.TagItem );
  4458. PROCEDURE SetWindowPointer* [base,-816]
  4459.   ( win     [8]  : WindowPtr;
  4460.     taglist [9]..: u.Tag );
  4461. PROCEDURE TimedDisplayAlert* [base,-822]
  4462.   ( alertNumber [0] : e.ULONG;
  4463.     string      [8] : ARRAY OF CHAR;
  4464.     height      [1] : e.ULONG;
  4465.     time        [9] : e.ULONG )
  4466.   : BOOLEAN;
  4467. PROCEDURE HelpControl* [base,-828]
  4468.   ( win   [8] : WindowPtr;
  4469.     flags [0] : s.SET32 );
  4470.  
  4471. (*---------------------------------------------------------------------*)
  4472.  
  4473. <*$LongVars+*>
  4474.  
  4475. PROCEDURE [0] PointInImage * (point: gfx.Point; VAR image: Image): BOOLEAN;
  4476. BEGIN 
  4477.   RETURN PointInImageL(SYS.VAL(LONGINT,point),image);
  4478. END PointInImage;
  4479.  
  4480. (*-- C Macros defined as procedures -----------------------------------*)
  4481.  
  4482. (*-----------------------------------*)
  4483. PROCEDURE [0] MenuNum * (n : INTEGER) : INTEGER;
  4484.  
  4485. BEGIN (* MenuNum *)
  4486.   RETURN SYS.AND (n, 01FH)
  4487. END MenuNum;
  4488.  
  4489. (*-----------------------------------*)
  4490. PROCEDURE [0] ItemNum * (n : INTEGER) : INTEGER;
  4491.  
  4492. BEGIN (* ItemNum *)
  4493.   RETURN SYS.AND (SYS.LSH (n, -5), 03FH)
  4494. END ItemNum;
  4495.  
  4496. (*-----------------------------------*)
  4497. PROCEDURE [0] SubNum * (n : INTEGER) : INTEGER;
  4498.  
  4499. BEGIN (* SubNum *)
  4500.   RETURN SYS.AND (SYS.LSH (n, -11), 01FH)
  4501. END SubNum;
  4502.  
  4503. (*-----------------------------------*)
  4504. PROCEDURE [0] ShiftMenu * (n : INTEGER) : INTEGER;
  4505.  
  4506. BEGIN (* ShiftMenu *)
  4507.   RETURN SYS.AND (n, 01FH)
  4508. END ShiftMenu;
  4509.  
  4510. (*-----------------------------------*)
  4511. PROCEDURE [0] ShiftItem * (n : INTEGER) : INTEGER;
  4512.  
  4513. BEGIN (* ShiftItem *)
  4514.   RETURN SYS.LSH (SYS.AND (n, 03FH), 5)
  4515. END ShiftItem;
  4516.  
  4517. (*-----------------------------------*)
  4518. PROCEDURE [0] ShiftSub * (n : INTEGER) : INTEGER;
  4519.  
  4520. BEGIN (* ShiftSub *)
  4521.   RETURN SYS.LSH (SYS.AND (n, 01FH), 11)
  4522. END ShiftSub;
  4523.  
  4524. (*-----------------------------------*)
  4525. PROCEDURE [0] FullMenuNum * (menu, item, sub : INTEGER) : INTEGER;
  4526.  
  4527. BEGIN (* FullMenuNum *)
  4528.   RETURN ShiftMenu (menu) + ShiftItem (item) + ShiftSub (sub)
  4529. END FullMenuNum;
  4530.  
  4531. (*------------------------------------*)
  4532. PROCEDURE [0] SRBNum * ( n : e.UBYTE ) : SHORTINT;
  4533. (* SerRWBits -> read bits per char *)
  4534. BEGIN (* SRBNum *)
  4535.   RETURN (8 - SYS.VAL (SHORTINT, SYS.LSH (n, -4)))
  4536. END SRBNum;
  4537.  
  4538. (*------------------------------------*)
  4539. PROCEDURE [0] SWBNum * ( n : e.UBYTE ) : SHORTINT;
  4540. (* SerRWBits -> write bits per chr *)
  4541. BEGIN (* SWBNum *)
  4542.   RETURN (8 - SYS.VAL (SHORTINT, SYS.AND (n, 0FH)))
  4543. END SWBNum;
  4544.  
  4545.  
  4546. (*------------------------------------*)
  4547. PROCEDURE [0] SSBNum * ( n : e.UBYTE ) : SHORTINT;
  4548. (* SerStopBuf -> stop bits per chr *)
  4549. BEGIN (* SSBNum *)
  4550.   RETURN (1 + SYS.VAL (SHORTINT, SYS.LSH (n, -4)))
  4551. END SSBNum;
  4552.  
  4553.  
  4554. (*------------------------------------*)
  4555. PROCEDURE [0] SPARNum * ( n : e.UBYTE ) : SHORTINT;
  4556. (* SerParShk -> parity setting    *)
  4557. BEGIN (* SPARNum *)
  4558.   RETURN SYS.LSH (n, -4)
  4559. END SPARNum;
  4560.  
  4561.  
  4562. (*------------------------------------*)
  4563. PROCEDURE [0] SHAKNum * ( n : e.UBYTE ) : SHORTINT;
  4564. (* SerParShk -> handshake mode    *)
  4565. BEGIN (* SHAKNum *)
  4566.   RETURN SYS.AND (n, 0FH)
  4567. END SHAKNum;
  4568.  
  4569. (* some convenient macros and casts *)
  4570.  
  4571. (*-----------------------------------*)
  4572. PROCEDURE [0] GadgetBox * (VAR g : Gadget) : IBoxPtr;
  4573.  
  4574. BEGIN (* GadgetBox *)
  4575.   RETURN SYS.ADR (g.leftEdge)
  4576. END GadgetBox;
  4577.  
  4578. (*-----------------------------------*)
  4579. PROCEDURE [0] IMBox * (VAR im : Image) : IBoxPtr;
  4580.  
  4581. BEGIN (* IMBox *)
  4582.   RETURN SYS.ADR (im.leftEdge)
  4583. END IMBox;
  4584.  
  4585. (*-----------------------------------*)
  4586. PROCEDURE [0] FGPen * (VAR im : Image) : SHORTINT;
  4587.  
  4588. BEGIN (* FGPen *)
  4589.   RETURN SYS.VAL (SHORTINT, im.planePick)
  4590. END FGPen;
  4591.  
  4592. (*-----------------------------------*)
  4593. PROCEDURE [0] BGPen * (VAR im : Image) : SHORTINT;
  4594.  
  4595. BEGIN (* BGPen *)
  4596.   RETURN SYS.VAL (SHORTINT, im.planeOnOff)
  4597. END BGPen;
  4598.  
  4599. (*-----------------------------------*)
  4600. PROCEDURE [0] CustomHook * (VAR gadget : Gadget) : u.HookPtr;
  4601. (* this casts MutualExclude for easy assignment of a hook
  4602.  * pointer to the unused MutualExclude field of a custom gadget
  4603.  *)
  4604.  
  4605. BEGIN (* CustomHook *)
  4606.   RETURN SYS.VAL (u.HookPtr, gadget.mutualExclude)
  4607. END CustomHook;
  4608.  
  4609. (* convert BOOLEANs to LONGBOOLs *)
  4610.  
  4611. PROCEDURE [0] BoolToLong*(b: BOOLEAN): LONGBOOL;
  4612. BEGIN
  4613.   IF b THEN RETURN LTRUE ELSE RETURN LFALSE END
  4614. END BoolToLong;
  4615.  
  4616. (* Convert pseudo unsigned integers (like those within PropInfo) to
  4617.  * LONGINTs and vice versa:
  4618.  *)
  4619.  
  4620. PROCEDURE [0] UIntToLong*(i : INTEGER): LONGINT;
  4621. BEGIN
  4622.   IF i<0 THEN RETURN i+10000H
  4623.   ELSE RETURN i
  4624.   END;
  4625. END UIntToLong;
  4626.  
  4627.  
  4628. PROCEDURE [0] LongToUInt*(l : LONGINT): INTEGER;
  4629. BEGIN
  4630.   <*$ < RangeChk- *> (* just return lower Word *)
  4631.   RETURN SHORT(l)
  4632.   <*$ > *>
  4633. END LongToUInt;
  4634.  
  4635.  
  4636. (*-----------------------------------------------------------------------*)
  4637. (*
  4638.  * The following procedures are implemented for to avoid using SYSTEM within
  4639.  * Oberon programs.
  4640.  *)
  4641.  
  4642. PROCEDURE [0] ScreenToRastPort*(s : ScreenPtr): gfx.RastPortPtr;
  4643. BEGIN
  4644.   RETURN SYS.ADR(s.rastPort);
  4645. END ScreenToRastPort;
  4646.  
  4647. PROCEDURE [0] ScreenToViewPort*(s : ScreenPtr): gfx.ViewPortPtr;
  4648. BEGIN RETURN SYS.ADR(s.viewPort);
  4649. END ScreenToViewPort;
  4650.  
  4651. (*-- Library Base variable --------------------------------------------*)
  4652.  
  4653. <*$LongVars-*>
  4654.  
  4655. PROCEDURE* [0] Close (VAR rc : LONGINT);
  4656.  
  4657. BEGIN (* Close *)
  4658.   IF base # NIL THEN e.CloseLibrary (base) END
  4659. END Close;
  4660.  
  4661. BEGIN (* Library *)
  4662.   base := SYS.VAL (IntuitionBasePtr,
  4663.                    e.OpenLibrary (intuitionName, e.libraryMinimum));
  4664.   IF base = NIL THEN HALT (100) END;
  4665.   int := base; Kernel.SetCleanup (Close)
  4666. END Intuition.
  4667.  
  4668.